Skip to content
Snippets Groups Projects
Commit 785b3b6a authored by Abdul Mateen Ahmad Khan's avatar Abdul Mateen Ahmad Khan
Browse files

Update Machine.java

parent c5ddf140
Branches
No related tags found
No related merge requests found
...@@ -140,7 +140,7 @@ public class Machine ...@@ -140,7 +140,7 @@ public class Machine
private void validate_reg(int reg) private void validate_reg(int reg)
throws InvalidInstructionException throws InvalidInstructionException
{ {
if (reg < 0 || reg > MAX_REG) { if (reg <= 0 || reg > MAX_REG) {
throw new InvalidInstructionException(); throw new InvalidInstructionException();
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment