advent2023

Advent of Code 2023 solutions
git clone git://bsandro.tech/advent2023
Log | Files | Refs | LICENSE

commit 064374a6e534a628338bad38adea33b7aa8996c9
parent 301ce41c9310a1d78504ba072640f22ce5812b3e
Author: bsandro <email@bsandro.tech>
Date:   Fri, 12 Jan 2024 18:13:17 +0200

day 10 p2 small bugfix that I was only able to catch on powerpc for some reason

Diffstat:
Mday10/puzzle.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/day10/puzzle.c b/day10/puzzle.c @@ -166,14 +166,13 @@ int traverse(Map *map, Pos start, Map *loop) { while (is_valid(map, p)) { int offset = p.y*map->w+p.x; loop->area[offset] = map->area[offset]; - p = get_next(map, p); - offset = p.y*map->w+p.x; len++; if (map->area[offset]=='S') { // we need to transform S into real pipe type loop->area[offset] = 'S'; return len; } + p = get_next(map, p); } return -1; }