Skip to content

Commit

Permalink
Fixed underflow off-by-one bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tiborbaksa committed Jul 19, 2015
1 parent f394773 commit 3ae7320
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion assets/asmsimulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ var app = angular.module('ASMSimulator', []);
self.zero = true;
} else if (value < 0) {
self.carry = true;
value = 255 - (-value) % 256;
value = 256 - (-value) % 256;
}

return value;
Expand Down
Loading

0 comments on commit 3ae7320

Please sign in to comment.