diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/kilo.c | 1 | ||||
-rw-r--r-- | src/lua.c | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/kilo.c b/src/kilo.c index f5cea3d..4a5bf52 100644 --- a/src/kilo.c +++ b/src/kilo.c @@ -1080,7 +1080,6 @@ static int Quit = 0; static int Back_to_big_picture = 0; extern void save_editor_state(int rowoff, int coloff, int cy, int cx); static void editorProcessKeypress(lua_State* L) { - lua_settop(L, 0); /* big hammer to avoid overflowing the stack */ int c = getch(); //? mvprintw(LINES-3, 60, "key: %d\n", c); //? getch(); diff --git a/src/lua.c b/src/lua.c index 834e547..ac6e249 100644 --- a/src/lua.c +++ b/src/lua.c @@ -901,10 +901,10 @@ int restore_editor_view (lua_State *L) { status = load_editor_buffer_to_current_definition_in_image(L); if (status == 0 || lua_isnil(L, -1)) break; - Previous_error = strdup(lua_tostring(L, -1)); /* memory leak */ + Previous_error = lua_tostring(L, -1); if (Previous_error == NULL) Previous_error = "(error object is not a string)"; - lua_pop(L, 1); back_to_big_picture = resumeEdit(L); + lua_pop(L, 1); } return back_to_big_picture; } |