Use lua_tointeger instead of lua_tonumber

This commit is contained in:
Pasi Kallinen
2019-11-07 19:28:58 +02:00
parent 293082079c
commit 4e438e0146
3 changed files with 9 additions and 9 deletions

View File

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