rre, repl: quit if attempt to store before address 0
FossilOrigin-Name: ce61c9c18e464240e22f68b50fe17474ef089a67143e4c3d3b615b83baae42f7
This commit is contained in:
parent
ec4e406feb
commit
777b15e56a
2 changed files with 2 additions and 2 deletions
|
@ -443,7 +443,7 @@ void inst_fetch() {
|
|||
}
|
||||
|
||||
void inst_store() {
|
||||
if (TOS <= IMAGE_SIZE) {
|
||||
if (TOS <= IMAGE_SIZE && TOS >= 0) {
|
||||
memory[TOS] = NOS;
|
||||
inst_drop();
|
||||
inst_drop();
|
||||
|
|
|
@ -978,7 +978,7 @@ void inst_fetch() {
|
|||
}
|
||||
|
||||
void inst_store() {
|
||||
if (TOS <= IMAGE_SIZE) {
|
||||
if (TOS <= IMAGE_SIZE && TOS >= 0) {
|
||||
memory[TOS] = NOS;
|
||||
inst_drop();
|
||||
inst_drop();
|
||||
|
|
Loading…
Reference in a new issue