fix crash on digit tile

This commit is contained in:
Crispy 2024-10-05 19:05:58 +02:00
parent cf920d7a63
commit 144a49e7c6

View file

@ -116,7 +116,7 @@ impl Machine {
Tile::Digit(d) => { Tile::Digit(d) => {
let new_val = value let new_val = value
.wrapping_mul(10) .wrapping_mul(10)
.wrapping_add((*d - b'0') as MarbleValue); .wrapping_add(*d as MarbleValue);
*target = Tile::Marble { *target = Tile::Marble {
value: new_val, value: new_val,
dir, dir,