Browse Source

Solved part2

Piotr Czajkowski 2 weeks ago
parent
commit
2888b37dd5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      03/code.go

+ 1 - 1
03/code.go

@@ -58,11 +58,11 @@ func part2(lines []string) int {
 		for reading {
 			if multiply {
 				index := strings.Index(line, "don't()")
-				multiply = false
 				if index == -1 {
 					endIndex = len(line)
 					reading = false
 				} else {
+					multiply = false
 					endIndex = index
 				}