Skip to content
Snippets Groups Projects
Commit 40906693 authored by Zhuolun Lang's avatar Zhuolun Lang
Browse files

Update Machine.java

parent cc86db4d
No related branches found
No related tags found
No related merge requests found
...@@ -170,7 +170,7 @@ public class Machine ...@@ -170,7 +170,7 @@ public class Machine
int pc = 0; int pc = 0;
final int progLength = instructions.size(); final int progLength = instructions.size();
while(true){ while(true){
if (pc < 0 || pc >= progLength){ if (pc < 0 && pc >= progLength){
/* will cause NoReturnValueException to be thrown /* will cause NoReturnValueException to be thrown
* but that is not a bug and and indeed is what the * but that is not a bug and and indeed is what the
* VM is supposed to do if the pc becomes negative, * VM is supposed to do if the pc becomes negative,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment