diff --git a/PRIVATE b/PRIVATE index d90babadf..5d27d879a 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit d90babadfb0a33afa1b793044cc4efd4d7430731 +Subproject commit 5d27d879abaeb1542e3f9f3065172be740af2899 diff --git a/src/IO.f90 b/src/IO.f90 index 33ab7ee97..36b774191 100644 --- a/src/IO.f90 +++ b/src/IO.f90 @@ -124,7 +124,9 @@ function IO_read(fileName) result(fileContent) integer :: & fileLength, & fileUnit, & - myStat + myStat, & + firstEOL + character, parameter :: CR = achar(13) inquire(file = fileName, size=fileLength) @@ -141,10 +143,12 @@ function IO_read(fileName) result(fileContent) if(myStat /= 0) call IO_error(102,ext_msg=trim(fileName)) close(fileUnit) - if(scan(fileContent,achar(13)) /= 0) call IO_error(115) if(fileContent(fileLength:fileLength) /= IO_EOL) fileContent = fileContent//IO_EOL ! ensure EOL@EOF + firstEOL = index(fileContent,IO_EOL) + if(scan(fileContent(firstEOL:firstEOL),CR) /= 0) call IO_error(115) + end function IO_read