Skip to content

Commit e55e2bf

Browse files
committed
Merge pull request #18 from tiborbaksa/master
fix(cpu): Underflow off-by-one bug
2 parents f394773 + 3ae7320 commit e55e2bf

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

assets/asmsimulator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ var app = angular.module('ASMSimulator', []);
719719
self.zero = true;
720720
} else if (value < 0) {
721721
self.carry = true;
722-
value = 255 - (-value) % 256;
722+
value = 256 - (-value) % 256;
723723
}
724724

725725
return value;

0 commit comments

Comments
 (0)