diff options
Diffstat (limited to '')
-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 |