소스 검색

Solved part2

Piotr Czajkowski 4 달 전
부모
커밋
2888b37dd5
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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
 				}