We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 364f560 commit 25f2e22Copy full SHA for 25f2e22
ch5/ch5-cpu3/src/main.rs
@@ -42,7 +42,7 @@ struct CPU {
42
let sp = self.stack_pointer;
43
let stack = &mut self.stack;
44
45
- if sp > stack.len() {
+ if sp >= stack.len() {
46
panic!("Stack overflow!")
47
}
48
ch5/ch5-cpu4/src/main.rs
@@ -81,7 +81,7 @@ impl CPU {
81
82
83
84
85
86
87
0 commit comments