Skip to content
Snippets Groups Projects
Commit 997bccbb authored by He Zhu's avatar He Zhu
Browse files

Update Machine.java

parent bee2a546
No related branches found
No related tags found
No related merge requests found
......@@ -148,7 +148,8 @@ public class Machine
private void validate_offset(int offset)
throws InvalidInstructionException
{
if (offset < -MAX_ADDR || offset > MAX_ADDR) {
//it was offset < -MAX_ADDR || offset > MAX_ADDR
if (offset >= -MAX_ADDR || offset <= MAX_ADDR) {
throw new InvalidInstructionException();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment