aboutsummaryrefslogtreecommitdiffstats
path: root/day9/part2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'day9/part2.cpp')
-rw-r--r--day9/part2.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/day9/part2.cpp b/day9/part2.cpp
index d6da81b..bb7fda2 100644
--- a/day9/part2.cpp
+++ b/day9/part2.cpp
@@ -46,9 +46,10 @@ int main()
ty += hy > ty ? 1 : -1;
}
+ }
+
if (std::find(locs.cbegin(), locs.cend(), knots.back()) == locs.cend())
locs.emplace_back(knots.back());
- }
}
}