diff options
author | roman65536 <roman65536@yahoo.com> | 2017-03-18 11:24:44 +0100 |
---|---|---|
committer | roman65536 <roman65536@yahoo.com> | 2017-03-18 11:24:44 +0100 |
commit | 3eb558daaf5d09c6c31ed1c736f09331eea2b2f1 (patch) | |
tree | ecdaadc2353a0b1eba6a325712eb5bc5f952d76e /src | |
parent | 3e91cbd69fbd9fea6caf1952c71a8033056179c3 (diff) |
Fixed a problem with lua trigger lgetnum
Diffstat (limited to 'src')
-rw-r--r-- | src/lua.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -42,7 +42,11 @@ extern WINDOW * input_win; lua_State *L; void bail(lua_State *L, char *msg){ - sc_debug("FATAL ERROR: %s: %s", msg, lua_tostring(L, -1)); + //sc_debug("FATAL ERROR: %s: %s", msg, lua_tostring(L, -1)); + volatile char *error=lua_tostring(L,-1); + fprintf(stderr,"%s",error); + + fprintf(stderr,"FATAL ERROR: %s: %s", msg, lua_tostring(L, -1)); //exit(1); shall exit here? } @@ -50,8 +54,8 @@ static int l_getnum (lua_State *L) { int r,c; struct ent **pp; struct ent *p; - r = lua_tointeger(L, 1); /* get argument */ - c = lua_tointeger(L, 2); + c = lua_tointeger(L, 1); /* get argument */ + r = lua_tointeger(L, 2); // sc_debug("getnum !!"); pp = ATBL(tbl,r,c); |