casting lua_tointeger

This commit is contained in:
nhmall
2019-11-29 17:38:51 -05:00
parent f41530bea8
commit 453745701f
3 changed files with 11 additions and 7 deletions

View File

@@ -217,8 +217,8 @@ lua_State *L;
int argc = lua_gettop(L);
if (argc == 2) {
int x = LUA_INTCAST(lua_tointeger(L, 1));
int y = LUA_INTCAST(lua_tointeger(L, 2));
int x = (int) lua_tointeger(L, 1);
int y = (int) lua_tointeger(L, 2);
if (x >= 0 && x < COLNO && y >= 0 && y < ROWNO) {
char buf[BUFSZ];