From cd740fc18b3cd8a43ccd9e6705810d042db3afb9 Mon Sep 17 00:00:00 2001 From: wfrsk Date: Sat, 8 Apr 2023 02:44:07 +0200 Subject: [PATCH] lua: fix crash with print when the value to print is not a string --- src/plugins/lua/weechat-lua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/lua/weechat-lua.c b/src/plugins/lua/weechat-lua.c index c90b4d64e..1a247bfab 100644 --- a/src/plugins/lua/weechat-lua.c +++ b/src/plugins/lua/weechat-lua.c @@ -511,7 +511,7 @@ weechat_lua_load (const char *filename, const char *code) FILE *fp; char *lua_redirect_output = { "function weechat_output_string(str)\n" - " weechat.__output__(str)\n" + " weechat.__output__(tostring(str))\n" "end\n" "weechat_outputs = {\n" " write = weechat_output_string\n"