From c251d1879fd5f3b2705547182622ec19175ff1a7 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Wed, 28 Aug 2019 00:56:08 -0500 Subject: 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 --- apps/plugins/lua/strtol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/plugins/lua/strtol.c') diff --git a/apps/plugins/lua/strtol.c b/apps/plugins/lua/strtol.c index 184951b844..3dd29b6b57 100644 --- a/apps/plugins/lua/strtol.c +++ b/apps/plugins/lua/strtol.c @@ -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; -- cgit v1.2.3