1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-29 14:26:39 +02:00

core, plugins: replace "%p" by "%lx" in calls to sscanf

This commit is contained in:
Sébastien Helleu
2025-05-15 20:08:26 +02:00
parent 95a940294e
commit a0ffb9e5dd
4 changed files with 14 additions and 6 deletions
+4 -1
View File
@@ -61,6 +61,7 @@ test_modifier_cb (const void *pointer, void *data,
char **items, *new_string;
const char *ptr_plugin, *ptr_tags, *ptr_msg;
int num_items, length, rc;
unsigned long value;
struct t_gui_buffer *ptr_buffer;
/* make C++ compiler happy */
@@ -81,10 +82,12 @@ test_modifier_cb (const void *pointer, void *data,
ptr_tags = (num_items >= 2) ? items[1] : NULL;
rc = sscanf (items[0], "%p", &ptr_buffer);
rc = sscanf (items[0], "%lx", &value);
if ((rc == EOF) || (rc == 0))
goto error;
ptr_buffer = (struct t_gui_buffer *)value;
ptr_plugin = gui_buffer_get_plugin_name (ptr_buffer);
if (!ptr_plugin)
goto error;