diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-07-28 15:07:01 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-07-28 15:07:01 +0200 |
commit | 78e006b9b02fac94c910445d842f6dc5331fa57a (patch) | |
tree | c03873efec0f0ed556de2b98fde4353da75f1b93 /src/if_lua.c | |
parent | e2390c7f32879ab7942adf0d38b1db34933695fa (diff) | |
download | vim-git-78e006b9b02fac94c910445d842f6dc5331fa57a.tar.gz |
patch 8.2.3234: crash when printing long string with Luav8.2.3234
Problem: Crash when printing long string with Lua.
Solution: Remove lua_pop(). (Martin Tournoij, closes #8648)
Diffstat (limited to 'src/if_lua.c')
-rw-r--r-- | src/if_lua.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/if_lua.c b/src/if_lua.c index 82dffb0ba..79fb68168 100644 --- a/src/if_lua.c +++ b/src/if_lua.c @@ -1734,9 +1734,9 @@ luaV_print(lua_State *L) 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) |