diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lj_tab.c | 2 | ||||
| -rw-r--r-- | src/luaconf.h | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/src/lj_tab.c b/src/lj_tab.c index 535a69f5..869c5f03 100644 --- a/src/lj_tab.c +++ b/src/lj_tab.c | |||
| @@ -635,7 +635,7 @@ LJ_NOINLINE static MSize tab_len_slow(GCtab *t, size_t hi) | |||
| 635 | while ((tv = lj_tab_getint(t, (int32_t)hi)) && !tvisnil(tv)) { | 635 | while ((tv = lj_tab_getint(t, (int32_t)hi)) && !tvisnil(tv)) { |
| 636 | lo = hi; | 636 | lo = hi; |
| 637 | hi += hi; | 637 | hi += hi; |
| 638 | if (hi > (size_t)(INT_MAX-2)) { /* Punt and do a linear search. */ | 638 | if (hi > (size_t)(0x7fffffff - 2)) { /* Punt and do a linear search. */ |
| 639 | lo = 1; | 639 | lo = 1; |
| 640 | while ((tv = lj_tab_getint(t, (int32_t)lo)) && !tvisnil(tv)) lo++; | 640 | while ((tv = lj_tab_getint(t, (int32_t)lo)) && !tvisnil(tv)) lo++; |
| 641 | return (MSize)(lo - 1); | 641 | return (MSize)(lo - 1); |
diff --git a/src/luaconf.h b/src/luaconf.h index 1cf3a03c..7b15651c 100644 --- a/src/luaconf.h +++ b/src/luaconf.h | |||
| @@ -9,7 +9,6 @@ | |||
| 9 | #ifndef WINVER | 9 | #ifndef WINVER |
| 10 | #define WINVER 0x0501 | 10 | #define WINVER 0x0501 |
| 11 | #endif | 11 | #endif |
| 12 | #include <limits.h> | ||
| 13 | #include <stddef.h> | 12 | #include <stddef.h> |
| 14 | 13 | ||
| 15 | /* Default path for loading Lua and C modules with require(). */ | 14 | /* Default path for loading Lua and C modules with require(). */ |
