[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Lua 5.2 string formatting check fails when using integers
- From: Markus Willhelm Schmid <willhelm.schmid@...>
- Date: Fri, 13 Apr 2012 06:52:14 -0700
We run Lua 5.2 in an embedded device and have changed lua_Number to
the C type int.
There are a few problems with this in the new Lua 5.2
In lstrlib.c line 883, please consider changing:
luaL_argcheck(L, 0 <= n && n < (MAX_UINTFRM + 1), arg,
to:
luaL_argcheck(L, 0 <= n && (unsigned LUA_INTFRM_T)n <= (MAX_UINTFRM), arg,
Regards,
Will