Skip to content

Commit

Permalink
Merge pull request #2191 from andrew-platt/b/InitFileInfo_blankLine
Browse files Browse the repository at this point in the history
[BugFix] blank line not handled by InitFileInfo
  • Loading branch information
andrew-platt authored May 8, 2024
2 parents dc48c26 + e26114d commit 7bffa49
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion modules/nwtc-library/src/NWTC_IO.f90
Original file line number Diff line number Diff line change
Expand Up @@ -4111,7 +4111,9 @@ subroutine InitFileInfo_FromNullCString(FileString, FileInfo, ErrStat, ErrMsg)
NullLoc = index(FileString(idx:len(FileString)),C_NULL_CHAR)
! started indexing at idx, so add that back in for location in FileString
NullLoc = NullLoc + idx - 1
if (NullLoc > idx) then
if (NullLoc == idx) then ! blank line
FileStringArray(Line) = ''
elseif (NullLoc > idx) then
FileStringArray(Line) = trim(FileString(idx:NullLoc-1))
else
! If not NULL terminated
Expand Down
2 changes: 1 addition & 1 deletion reg_tests/r-test

0 comments on commit 7bffa49

Please sign in to comment.