Skip to content

Commit 3ae7320

Browse files
committed
Fixed underflow off-by-one bug
1 parent f394773 commit 3ae7320

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)