fix sim input buffer

This commit is contained in:
Crispy 2024-10-05 15:57:20 +02:00
parent 12a8544645
commit 175d01cb03

View file

@ -63,6 +63,7 @@ impl Machine {
} }
pub fn set_input(&mut self, bytes: Vec<u8>) { pub fn set_input(&mut self, bytes: Vec<u8>) {
self.input_index = self.input_index.min(bytes.len());
self.input = bytes; self.input = bytes;
} }