about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-11-26 22:03:47 -0800
committerKartik K. Agaram <vc@akkartik.com>2021-11-26 22:03:47 -0800
commit1e911f95ef0426a6f36519db8d0f8e39a4424008 (patch)
tree9f3966d87c5813c9f0fb9f815ec224349fe6c179
parent31816db0ccd23b398dbfe02d6dcab1a7cc703e90 (diff)
downloadteliva-1e911f95ef0426a6f36519db8d0f8e39a4424008.tar.gz
bugfix: emit legal Lua representation
-rw-r--r--src/lua.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lua.c b/src/lua.c
index 615f92c..7930845 100644
--- a/src/lua.c
+++ b/src/lua.c
@@ -454,7 +454,7 @@ static void save_image (lua_State *L) {
     for (lua_pushnil(L); lua_next(L, table) != 0; lua_pop(L, 1)) {
       const char* key = lua_tostring(L, -2);
       if (strcmp(key, "__teliva_undo") == 0) {
-        fprintf(out, "    %s = %ld\n", key, lua_tointeger(L, -1));
+        fprintf(out, "    %s = %ld,\n", key, lua_tointeger(L, -1));
         continue;
       }
       const char* value = lua_tostring(L, -1);