summaryrefslogtreecommitdiffstats
path: root/src/lua.c
diff options
context:
space:
mode:
authormongo <andmarti@gmail.com>2017-03-15 15:38:19 -0300
committermongo <andmarti@gmail.com>2017-03-15 15:38:19 -0300
commitd677b1a4c3cf126cd1849c74e1e29f2094518582 (patch)
tree9872aa65b19a205edacade8a1cbe373590dc7496 /src/lua.c
parentd7e3a1f826d165dac5a58321898842989a2c4e7d (diff)
Fix in query function
Diffstat (limited to 'src/lua.c')
-rw-r--r--src/lua.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/lua.c b/src/lua.c
index 440acb7..e1f1bc5 100644
--- a/src/lua.c
+++ b/src/lua.c
@@ -42,7 +42,7 @@ extern WINDOW * input_win;
lua_State *L;
void bail(lua_State *L, char *msg){
- sc_error("FATAL ERROR: %s: %s",
+ sc_debug("FATAL ERROR: %s: %s",
msg, lua_tostring(L, -1));
exit_app(1);
}
@@ -91,7 +91,7 @@ static int l_setstr (lua_State *L) {
struct ent *p;
c = lua_tointeger(L, 1); /* get argument */
r = lua_tointeger(L, 2);
- val=lua_tostring(L,3);
+ val=(char *) lua_tostring(L,3);
//sc_debug("setstr !!");
p=lookat(r,c);
@@ -196,11 +196,6 @@ char * query(char * initial_msg) {
int d = wgetch(input_win);
while (d != OKEY_ENTER && d != OKEY_ESC) {
- if (d == ERR) {
- d = wgetch(input_win);
- continue;
- }
-
if (d == OKEY_BS || d == OKEY_BS2) {
del_char(hline, strlen(hline) - 1);
} else {