1
0
Fork 0
forked from len0rd/rockbox

lua fix mem_read_write, strtol

back when I wrote this I was running the sim on a 32 bit machine
I didn't catch the hardcoded LONG_MAX reference or the fact that
lua_tointeger maxes ot at 32 bits

on 64 bit machines strtol caused all kinds of issues especially since
it returned the real LONG_MIN/MAX values

Change-Id: I3571ebbd9df333f7cbf4077562412c27429bfadc
This commit is contained in:
William Wilgus 2019-08-28 00:56:08 -05:00
parent b99d4d7fa9
commit c251d1879f
2 changed files with 4 additions and 3 deletions

View file

@ -2,7 +2,7 @@
extern unsigned long int strtoul(const char *ptr, char **endptr, int base);
#define ABS_LONG_MIN 2147483648UL
#define ABS_LONG_MIN LONG_MAX
long int strtol(const char *nptr, char **endptr, int base)
{
int neg=0;