From d7a882e57d52aa8ad21f466a628370693a7b6796 Mon Sep 17 00:00:00 2001 From: mongo Date: Wed, 15 Mar 2017 16:22:11 -0300 Subject: Swap r and c variables in some functions --- src/lua.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/lua.c') diff --git a/src/lua.c b/src/lua.c index c1319e1..d706caf 100644 --- a/src/lua.c +++ b/src/lua.c @@ -51,8 +51,8 @@ static int l_getnum (lua_State *L) { int r,c; struct ent **pp; struct ent *p; - c = lua_tointeger(L, 1); /* get argument */ - r = lua_tointeger(L, 2); + r = lua_tointeger(L, 1); /* get argument */ + c = lua_tointeger(L, 2); // sc_debug("getnum !!"); pp = ATBL(tbl,r,c); @@ -69,8 +69,8 @@ static int l_setnum (lua_State *L) { double val; //struct ent ** pp; struct ent *p; - c = lua_tointeger(L, 1); /* get argument */ - r = lua_tointeger(L, 2); + r = lua_tointeger(L, 1); /* get argument */ + c = lua_tointeger(L, 2); val=lua_tonumber(L,3); sc_debug("getnum !!"); @@ -89,8 +89,8 @@ static int l_setstr (lua_State *L) { char * val; //struct ent ** pp; struct ent *p; - c = lua_tointeger(L, 1); /* get argument */ - r = lua_tointeger(L, 2); + r = lua_tointeger(L, 1); /* get argument */ + c = lua_tointeger(L, 2); val=(char *) lua_tostring(L,3); //sc_debug("setstr !!"); @@ -106,8 +106,8 @@ static int l_setform (lua_State *L) { //struct ent ** pp; //struct ent * p; char buf[256]; - c = lua_tointeger(L, 1); /* get argument */ - r = lua_tointeger(L, 2); + r = lua_tointeger(L, 1); /* get argument */ + c = lua_tointeger(L, 2); val = (char *) lua_tostring(L,3); //sc_debug("setstr !!"); @@ -133,8 +133,8 @@ static int l_colrow2a(lua_State *L) { int c, r; char buf[16]; - c = lua_tointeger(L, 1); /* get argument */ - r = lua_tointeger(L, 2); + r = lua_tointeger(L, 1); /* get argument */ + c = lua_tointeger(L, 2); sprintf(buf,"%s%d", coltoa(c),r); lua_pushstring(L,buf); return 1; -- cgit v1.2.3