summaryrefslogtreecommitdiffstats
path: root/src/lua.c
diff options
context:
space:
mode:
authorroman65536 <roman65536@yahoo.com>2017-03-18 11:24:44 +0100
committerroman65536 <roman65536@yahoo.com>2017-03-18 11:24:44 +0100
commit3eb558daaf5d09c6c31ed1c736f09331eea2b2f1 (patch)
treeecdaadc2353a0b1eba6a325712eb5bc5f952d76e /src/lua.c
parent3e91cbd69fbd9fea6caf1952c71a8033056179c3 (diff)
Fixed a problem with lua trigger lgetnum
Diffstat (limited to 'src/lua.c')
-rw-r--r--src/lua.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lua.c b/src/lua.c
index 8a1b1f3..f784ef3 100644
--- a/src/lua.c
+++ b/src/lua.c
@@ -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);