mirror of
https://github.com/gbdev/rgbds.git
synced 2026-10-06 20:25:34 +00:00
Format INT32_MIN as '-2147483648', not '--2147483648'
This commit is contained in:
1 parent
748e7dd4c7
commit
7dd34f1572
4 files changed
+13
-3
No files matched your search
+2
-3
@@ -182,10 +182,9 @@ void fmt_PrintNumber(char *buf, size_t bufLen, struct FormatSpec const *fmt, uin
|
||||
if (fmt->type == 'd' || fmt->type == 'f') {
|
||||
int32_t v = value;
|
||||
|
||||
if (v < 0) {
|
||||
if (v < 0 && v != INT32_MIN) {
|
||||
sign = '-';
|
||||
if (v != INT32_MIN)
|
||||
value = -v;
|
||||
value = -v;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user