Skip to content

Commit d405bb2

Browse files
committed
try this
1 parent 7e5e858 commit d405bb2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/json_value_module.F90

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9028,9 +9028,14 @@ subroutine get_current_line_from_file_stream(json,iunit,line)
90289028
end if
90299029
istart = istart-1 !rewind until the beginning of the line
90309030
end do
9031-
iend = json%ipos
9031+
iend = istart
90329032
do
90339033
read(iunit,pos=iend,iostat=ios) c
9034+
if (IS_IOSTAT_END(ios)) then
9035+
! account for end of file without linebreak
9036+
iend=iend-1
9037+
exit
9038+
end if
90349039
if (c==newline .or. ios/=0) exit
90359040
iend=iend+1
90369041
end do

0 commit comments

Comments
 (0)