From 15e0ac70f95ac5123c52b9d5dcae02bd812984cd Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 11 Nov 2021 16:09:46 -0800 Subject: . --- src/lua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lua.c') diff --git a/src/lua.c b/src/lua.c index 7da0f02..a0ca094 100644 --- a/src/lua.c +++ b/src/lua.c @@ -337,6 +337,7 @@ void editString(lua_State *L, char *name) { teliva_get_definition(L, name); //? stackDump(L); const char *contents = lua_tostring(L, -1); + lua_pop(L, 1); int outfd = open("teliva_editbuffer", O_WRONLY|O_CREAT|O_TRUNC, 0644); write(outfd, contents, strlen(contents)); close(outfd); @@ -351,7 +352,6 @@ void editString(lua_State *L, char *name) { close(infd); /* save contents back into image */ - lua_pop(L, 1); lua_pushstring(L, new_contents); lua_setfield(L, -2, name); -- cgit 1.4.1-2-gfad0