change 1 to 0

This commit is contained in:
b1ek 2023-08-22 23:12:04 +10:00
parent 2cbe2dc197
commit 1d50dd259b
Signed by: blek
GPG Key ID: 14546221E3595D0C
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ pub fn eval_mem(bf_str: &&str, mem: &mut [u8], pointer: &mut usize) -> Result<()
}
if char == '<' {
if *pointer == 0 {
return Err(format!("Attempt to reduce pointer to less than 1 ({})", pos));
return Err(format!("Attempt to reduce pointer to less than 0 ({})", pos));
}
*pointer -= 1;
continue