Skip to content
This repository was archived by the owner on Nov 25, 2019. It is now read-only.

Commit a01d87f

Browse files
committed
Always print char, even if unprintable
1 parent 0ffeb36 commit a01d87f

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

rust/main.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,7 @@ fn evaluate(instructions: Vec<char>) {
5959
tape[mem_ptr] = input.unwrap_or(0x00);
6060
},
6161
'!' => {
62-
// print as char if printable ASCII, otherwise print raw
63-
if tape[mem_ptr] >= 0x20 && tape[mem_ptr] <= 0x7e {
64-
print!("{}", tape[mem_ptr] as char)
65-
} else {
66-
print!("{}", tape[mem_ptr])
67-
}
62+
print!("{}", tape[mem_ptr] as char);
6863
std::io::stdout().flush().unwrap();
6964
},
7065
'[' => {

0 commit comments

Comments
 (0)