From 4c14c6092eacbc5b53ab5edd86d809673a64ce8c Mon Sep 17 00:00:00 2001 From: Keenan Tims Date: Wed, 11 Dec 2024 18:59:58 -0800 Subject: [PATCH] bugfix: count off by one, thought ^ was left in the map, but it gets replaced by X --- src/day6.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/day6.rs b/src/day6.rs index 39a60ea..af4d3d1 100644 --- a/src/day6.rs +++ b/src/day6.rs @@ -164,7 +164,7 @@ pub fn part1(map: &Map) -> u64 { let mut map = map.clone(); map.run_guard::(); - map.grid.count(&b'X') as u64 + 1 // 'X' path positions + 1 starting position + map.grid.count(&b'X') as u64 } // PROBLEM 2 solution