Instruction length fixes

This commit is contained in:
scawful
2023-12-03 06:16:17 -05:00
parent ca9cc42d6b
commit db91b0401a
4 changed files with 83 additions and 31 deletions

View File

@@ -270,6 +270,7 @@ class MemoryImpl : public Memory, public Loggable {
} else {
// Handle stack underflow
std::cout << "Stack underflow!" << std::endl;
throw std::runtime_error("Stack underflow!");
}
}
@@ -279,7 +280,7 @@ class MemoryImpl : public Memory, public Loggable {
} else {
// Handle stack overflow
std::cout << "Stack overflow!" << std::endl;
return 0;
throw std::runtime_error("Stack overflow!");
}
}