Skip to content

Commit 54e08f2

Browse files
committed
minor simplification.
1 parent d64ebd3 commit 54e08f2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/json_module.f90

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5195,12 +5195,13 @@ recursive function pop_char(unit, str, eof, skip_ws) result(popped)
51955195
else !read from the string
51965196
str_len = len(str) !length of the string
51975197
if (str_len>0) then
5198-
read (unit = str, fmt = '(A1)', iostat = ios) c
5198+
c = str(1:1)
51995199
if (str_len>1) then
52005200
str = str(2:str_len) !remove the character that was read
52015201
else
52025202
str = '' !that was the last one
52035203
end if
5204+
ios = 0
52045205
else
52055206
ios = IOSTAT_END !end of the string
52065207
end if

0 commit comments

Comments
 (0)