change 1 to 0
This commit is contained in:
parent
2cbe2dc197
commit
1d50dd259b
|
@ -75,7 +75,7 @@ pub fn eval_mem(bf_str: &&str, mem: &mut [u8], pointer: &mut usize) -> Result<()
|
||||||
}
|
}
|
||||||
if char == '<' {
|
if char == '<' {
|
||||||
if *pointer == 0 {
|
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;
|
*pointer -= 1;
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue