Reported by yupengda002. #1318
while ((tv = lj_tab_getint(t, (int32_t)hi)) && !tvisnil(tv)) {
lo = hi;
hi += hi;
- if (hi > (size_t)(INT_MAX-2)) { /* Punt and do a linear search. */
+ if (hi > (size_t)(0x7fffffff - 2)) { /* Punt and do a linear search. */
lo = 1;
while ((tv = lj_tab_getint(t, (int32_t)lo)) && !tvisnil(tv)) lo++;
return (MSize)(lo - 1);
#ifndef WINVER
#define WINVER 0x0501
#endif
-#include <limits.h>
#include <stddef.h>
/* Default path for loading Lua and C modules with require(). */