Skip to content

Commit 70a3f7a

Browse files
committed
unbreak lua51
1 parent 31892e7 commit 70a3f7a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lua_sysctl.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -514,10 +514,10 @@ luaA_sysctl_get(lua_State *L)
514514
else
515515
lua_pushinteger(L, mv);
516516
} else {
517-
if (intlen > sizeof(lua_Unsigned))
517+
if (intlen >= sizeof(lua_Integer))
518518
lua_pushnumber(L, umv);
519519
else
520-
lua_pushunsigned(L, umv);
520+
lua_pushinteger(L, umv);
521521
}
522522
lua_settable(L, -3);
523523
len -= intlen;
@@ -582,7 +582,7 @@ luaA_sysctl_IK2farenheit(lua_State *L)
582582
*/
583583

584584

585-
static const luaL_Reg lua_sysctl[] =
585+
static const luaL_reg lua_sysctl[] =
586586
{
587587
{"get", luaA_sysctl_get},
588588
{"set", luaA_sysctl_set},

0 commit comments

Comments
 (0)