Closed DavidKinder closed 7 years ago
See www.intfiction.org/forum/viewtopic.php?t=20768
The problem is in the code at "resume_number_L7_digit_L6": this converts the number to be printed to a positive value:
L1 = (L7 < 0) ? -L7 : L7; // Absolute value of number.
But since L1 is a signed 32-bit variable, this won't work for -2147483648, as +2147483648 can't be represented as a signed 32-bit value.
Fixed by https://github.com/DavidKinder/Git/commit/427d52c2898d07917eedac01049ed7732e13c448
I've updated the Glulxercise test (http://eblong.com/zarf/glulx/glulxercise.ulx) to test this case.
See www.intfiction.org/forum/viewtopic.php?t=20768
The problem is in the code at "resume_number_L7_digit_L6": this converts the number to be printed to a positive value:
L1 = (L7 < 0) ? -L7 : L7; // Absolute value of number.
But since L1 is a signed 32-bit variable, this won't work for -2147483648, as +2147483648 can't be represented as a signed 32-bit value.