From 175d01cb039af8113e1179c4fde131bed0118895 Mon Sep 17 00:00:00 2001 From: CrispyPin Date: Sat, 5 Oct 2024 15:57:20 +0200 Subject: [PATCH] fix sim input buffer --- src/marble_engine.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/marble_engine.rs b/src/marble_engine.rs index 9a4ce86..3e439a7 100644 --- a/src/marble_engine.rs +++ b/src/marble_engine.rs @@ -63,6 +63,7 @@ impl Machine { } pub fn set_input(&mut self, bytes: Vec) { + self.input_index = self.input_index.min(bytes.len()); self.input = bytes; }