Skip to content

Commit 9abfedb

Browse files
committed
bugfix read csv with only two columns
1 parent 26093c6 commit 9abfedb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/csv_module.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1229,7 +1229,7 @@ pure subroutine split(str,token,chunk_size,vals)
12291229

12301230
i1 = 1
12311231
i2 = itokens(1)-1
1232-
if (n_tokens>1) then
1232+
if (i2>=i1) then
12331233
vals(1)%str = str(i1:i2)
12341234
else
12351235
vals(1)%str = '' !the first character is a token

0 commit comments

Comments
 (0)