diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-11-11 16:09:46 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-11-11 16:09:46 -0800 |
commit | 15e0ac70f95ac5123c52b9d5dcae02bd812984cd (patch) | |
tree | baf59340f49bd70cb9a68f02ccc046e6a5fb7013 /src/lua.c | |
parent | 3e7ff252af32b2bd481d045f4b732acbdbe1b612 (diff) | |
download | teliva-15e0ac70f95ac5123c52b9d5dcae02bd812984cd.tar.gz |
.
Diffstat (limited to 'src/lua.c')
-rw-r--r-- | src/lua.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |