diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-11-14 00:49:40 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-11-14 00:52:25 -0800 |
commit | 5be743324c860f224ddd6d4bd1d3177b3422818c (patch) | |
tree | b68b2b781eaf626a6164a17472c85fe23bc8fb7f /src | |
parent | b64a21771e06ae798e0fcdeebc662fc2f2159ed4 (diff) | |
download | teliva-5be743324c860f224ddd6d4bd1d3177b3422818c.tar.gz |
slightly more robust on-disk format
Looks like Lua supports a little bit of programmability in its multi-line string literals. Even though I can't find this documented anywhere.
Diffstat (limited to 'src')
-rw-r--r-- | src/lua.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lua.c b/src/lua.c index 7108fa7..ae1e203 100644 --- a/src/lua.c +++ b/src/lua.c @@ -345,9 +345,9 @@ 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); const char* value = lua_tostring(L, -1); - fprintf(fp, " %s = [[", key); + fprintf(fp, " %s = [==[", key); fprintf(fp, "%s", value); - fprintf(fp, "]],\n"); + fprintf(fp, "]==],\n"); } fprintf(fp, "}\n"); fclose(fp); |