patch 8.2.3234: crash when printing long string with Lua
Problem: Crash when printing long string with Lua.
Solution: Remove lua_pop(). (Martin Tournoij, closes #8648)
diff --git a/src/if_lua.c b/src/if_lua.c
index 82dffb0..79fb681 100644
--- a/src/if_lua.c
+++ b/src/if_lua.c
@@ -1734,9 +1734,9 @@
s = lua_tolstring(L, -1, &l);
if (s == NULL)
return luaL_error(L, "cannot convert to string");
- if (i > 1) luaL_addchar(&b, ' '); // use space instead of tab
+ if (i > 1)
+ luaL_addchar(&b, ' '); // use space instead of tab
luaV_addlstring(&b, s, l, 0);
- lua_pop(L, 1);
}
luaL_pushresult(&b);
if (!got_int)