Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bug 2050 - Obvious bugs in SDL_ltoa and SDL_lltoa
pjz SDL_ltoa(-2147483648,s,10) only returns "-" because there is a bug in the code: if ( value < 0 ) { *bufp++ = '-'; value = -value; } but -(-2147483648) is still -2147483648 (0x80000000) as signed int (or long), so the following loop doesn't run at all. Similar bug are also in SDL_lltoa. BTW, there is no sanity check for radix.
- Loading branch information