[BugFix] blank line not handled by InitFileInfo #2191
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ready to merge.
Feature or improvement description
When an AeroDyn input file is read by
AeroDyn_Init
, it is processed byProcessComFile
. This routine can account for blank lines.However, if a file is passed as a
c_null
terminated string through the c-bindings interface, it is handled by theInitFileInfo
routine. This routine was prematurely exiting when a blank line was found instead of continuing as expected.This PR updates
InitFileInfo
to correctly handle blank lines and not end prematurely.Related issue, if one exists
PR #1909 ran into unexpected issues with a single blank line in the
AD.dat
of thepy_AD_B1n2_OLAF
regression test. This blank line is present inAD_B1n2_OLAF
, so we expect the two cases to work identically but the Python case was failing.Impacted areas of the software
Blank lines in input files passed through c-bindings interfaces as
c_null
terminated strings.Additional supporting information
Test results, if applicable
Changed the
py_AD_B1n2_OLAF/AD.dat
input file to matchAD_B1n2_OLAF/AD.dat
.