From 46aa19c61c9f0dddc70cb1a8efc41216647bd71f Mon Sep 17 00:00:00 2001 From: Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> Date: Sat, 9 Dec 2023 14:52:00 +0100 Subject: [PATCH] fix --- 2023/day09/src/number_parsing.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/2023/day09/src/number_parsing.rs b/2023/day09/src/number_parsing.rs index 47269cd..e61391d 100644 --- a/2023/day09/src/number_parsing.rs +++ b/2023/day09/src/number_parsing.rs @@ -22,6 +22,10 @@ fn parse(line: &str, into: &mut Vec) { } } } + if neg { + acc = -acc + }; + into.push(acc); } fn execute(