Browse Source

Handle silly trailing new lines

master
Chris Smith 5 years ago
parent
commit
d46eb23779
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      day16.nim

+ 1
- 1
day16.nim View File

@@ -74,7 +74,7 @@ for line in readFile("data/16.txt").splitlines:
74 74
                     opMappings[opcode] = ops[index]
75 75
         step = -1
76 76
     
77
-    if step == -1:
77
+    if step == -1 and line.len > 5:
78 78
         registers.execute(line.toInstr, opMappings)
79 79
 
80 80
 echo threeOrMore