From cdfff42f45b58e607297cb9afa84f829814f6d13 Mon Sep 17 00:00:00 2001 From: Eric Mertens Date: Sun, 6 Nov 2022 10:11:33 -0800 Subject: [PATCH] fixup --- day23.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/day23.cpp b/day23.cpp index 833c53f..f1b484e 100644 --- a/day23.cpp +++ b/day23.cpp @@ -32,8 +32,9 @@ auto Interact(Ethernet & ethernet, Machine & m, std::optional p) -> void i.pos = p->first; StepInput(m, p->second); Interact(ethernet, m, {}); + } else { + i.pos = -1; // no packet } - i.pos = -1; // no packet }, [&](Output d) { auto x = StepOutput(m); @@ -48,7 +49,8 @@ auto Interact(Ethernet & ethernet, Machine & m, std::optional p) -> void } // namespace auto main() -> int { - auto machines = BuildNetwork(Machine{ParseStream(std::cin)}); + std::ifstream fin { "/Users/emertens/Source/advent/inputs/2019/23.txt" }; + auto machines = BuildNetwork(Machine{ParseStream(fin)}); auto ethernet = Ethernet{}; std::optional part1;