From 8daf3d58fc8d989940ed8f8a96dd3a93fe8c0793 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Thu, 7 Oct 2021 18:24:48 +0200 Subject: Added submodules with the spec and the mycology test suite --- src/field.nim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/field.nim') 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 -- cgit v1.2.3