From 144a49e7c65d786b08f6bcd0a7e389811a36a4c6 Mon Sep 17 00:00:00 2001 From: CrispyPin Date: Sat, 5 Oct 2024 19:05:58 +0200 Subject: [PATCH] fix crash on digit tile --- src/marble_engine.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/marble_engine.rs b/src/marble_engine.rs index e82848d..29af792 100644 --- a/src/marble_engine.rs +++ b/src/marble_engine.rs @@ -116,7 +116,7 @@ impl Machine { Tile::Digit(d) => { let new_val = value .wrapping_mul(10) - .wrapping_add((*d - b'0') as MarbleValue); + .wrapping_add(*d as MarbleValue); *target = Tile::Marble { value: new_val, dir,