Closed curiousdannii-testing closed 2 years ago
557058:4c095ffd-6d6f-47ce-9e73-77c613347b86:
Comment by zarf :
Confirmed.
The simplest and, I suppose, only solution I see is to special-case that value. Same as "zero" is special-cased. Only with a much longer hard-coded string.
557058:4c095ffd-6d6f-47ce-9e73-77c613347b86:
Comment by zarf :
Now that I think about it, it would be slightly more elegant to print "minus two billion", set n to 147483648, and then goto the appropriate line to continue printing in the usual way.
Or just print "minus zero". I'd be fine with that. I can't speak for other IF authors.
Fixed via this commit:
https://github.com/ganelson/inform/commit/e36977909860e64d0130f8147cecaf9c0313dcfe
Comment by Graham Nelson:
For both 16 and 32-bit word sizes; it's not a Glulx-only problem. See test cases BIP-Say and BIP-Say-G.
Reported by : Spike
Description :
The minimum integer allowed by Glulx is -2147483648. Attempting to print that number in words instead prints nothing at all. However, printing -2147483647 or 2147483647 (the maximum integer allowed by Glulx) in words works just fine.
Steps to reproduce :
Additional information :
The problem appears to be in the I6 library (function LanguageNumber in file english.h). The routine for printing a number N in words begins by checking whether N is negative; if it is, it prints "minus", and replaces N with -N. The remainder of the routine then assumes that N is positive. Unfortunately, if N is the minimum integer, then -N = N, so that assumption doesn't work very well.
From this thread on intfiction.org: https://www.intfiction.org/forum/viewtopic.php?f=7&t=26948
imported from: [Mantis 2082] Trying to print the minimum integer in words instead prints nothing at all