From b8a42996c106567765896335bec664ecf0d95321 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Wed, 13 Jan 2010 09:56:34 +0100 Subject: Fix bug with string return value of callbacks in tcl plugin --- src/plugins/scripts/tcl/weechat-tcl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins') diff --git a/src/plugins/scripts/tcl/weechat-tcl.c b/src/plugins/scripts/tcl/weechat-tcl.c index bff1ba594..61d08bb8c 100644 --- a/src/plugins/scripts/tcl/weechat-tcl.c +++ b/src/plugins/scripts/tcl/weechat-tcl.c @@ -116,7 +116,7 @@ weechat_tcl_exec (struct t_plugin_script *script, if (ret_type == WEECHAT_SCRIPT_EXEC_STRING) { ret_cv = Tcl_GetStringFromObj (Tcl_GetObjResult (interp), &i); - if (ret_cv && ret_cv[0]) + if (ret_cv) ret_val = (void *)strdup (ret_cv); else ret_val = NULL; -- cgit v1.2.3