1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 13:56:37 +02:00

core: fix integer overflow with decimal numbers in calculation of expression

This commit is contained in:
Sébastien Helleu
2025-05-11 14:48:17 +02:00
parent d1c6d170ac
commit 7f96c31e1b
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -20,6 +20,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
Bug fixes::
* core: fix integer overflow with decimal numbers in calculation of expression
* core, plugins: fix integer overflow in loops (issue #2178)
* core: fix crash in case of NULL message sent to function gui_chat_printf_y_date_tags (issue #1883)
+2 -2
View File
@@ -336,9 +336,9 @@ calc_expression (const char *expr)
struct t_arraylist *list_values, *list_ops;
const char *ptr_expr, *ptr_expr2;
char str_result[64], *ptr_operator, *operator;
int index_op, decimals;
int index_op;
enum t_calc_symbol last_symbol;
double value, factor, *ptr_value;
double value, factor, decimals, *ptr_value;
list_values = NULL;
list_ops = NULL;