From 33a6c852b7ac5acc385c3e63fea1f0d486bcccd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 25 Feb 2024 16:12:54 +0100 Subject: [PATCH] tcl: fix truncation of long integer returned by function hdata_long --- ChangeLog.adoc | 1 + src/plugins/tcl/weechat-tcl-api.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 9b2c3b54a..430cbcd58 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -18,6 +18,7 @@ Bug fixes:: * core: add missing mouse events "alt-ctrl-button2" and "alt-ctrl-button3" * script: always display list of scripts when searching scripts with `/script search` (issue #2077) * script: fix default mouse keys (issue #2076) + * tcl: fix truncation of long integer returned by function hdata_long * trigger: fix memory leak when adding a new trigger with `/trigger` command Build:: diff --git a/src/plugins/tcl/weechat-tcl-api.c b/src/plugins/tcl/weechat-tcl-api.c index 9414ad27b..6f3265dca 100644 --- a/src/plugins/tcl/weechat-tcl-api.c +++ b/src/plugins/tcl/weechat-tcl-api.c @@ -5617,7 +5617,8 @@ API_FUNC(hdata_long) { Tcl_Obj *objp; char *hdata, *pointer, *name; - int result, i; + long result; + int i; API_INIT_FUNC(1, "hdata_long", API_RETURN_LONG(0)); if (objc < 4)