diff options
author | Julien Dessaux | 2021-10-07 18:24:48 +0200 |
---|---|---|
committer | Julien Dessaux | 2021-10-07 18:24:48 +0200 |
commit | 8daf3d58fc8d989940ed8f8a96dd3a93fe8c0793 (patch) | |
tree | a7e25e3025f4edd569eed9d08cf030d1b08756af /src | |
parent | Fixed tricky field loading bug (diff) | |
download | nimfunge98-8daf3d58fc8d989940ed8f8a96dd3a93fe8c0793.tar.gz nimfunge98-8daf3d58fc8d989940ed8f8a96dd3a93fe8c0793.tar.bz2 nimfunge98-8daf3d58fc8d989940ed8f8a96dd3a93fe8c0793.zip |
Added submodules with the spec and the mycology test suite
Diffstat (limited to 'src')
-rw-r--r-- | src/field.nim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/field.nim b/src/field.nim index 47c94b5..e63a64e 100644 --- a/src/field.nim +++ b/src/field.nim @@ -116,11 +116,11 @@ proc Load*(filename: string): ref Field = f.lines.add(Line()) l = addr f.lines[^1] trailingSpaces = 0 - if i+1 < n: - if data[i] == '\r' and data[i+1] == '\n': + if data[i] == '\r': + if i+1 < n and data[i+1] == '\n': inc i - else: - lastReadIsCR = true + else: + lastReadIsCR = true else: if data[i] == ' ': if l.l == 0: # trim leading spaces |