small changes

This commit is contained in:
nora 2021-05-03 16:08:35 +02:00
parent 329c33f3cb
commit 5cc058267b
6 changed files with 14 additions and 15 deletions

View file

@ -27,7 +27,7 @@ fn interpret(pgm: Vec<char>) -> String {
'-' => mem[pointer] = mem[pointer].wrapping_sub(1),
'.' => out.push(mem[pointer] as u8 as char),
',' => {
stdin().read(&mut in_buffer).unwrap();
stdin().read_exact(&mut in_buffer).unwrap();
mem[pointer] = in_buffer[0] as u8;
}
'[' => {