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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user