mirror of
https://github.com/weechat/weechat.git
synced 2026-07-04 16:53:14 +02:00
core, plugins: replace "%p" by "%lx" in calls to sscanf
This commit is contained in:
@@ -1151,6 +1151,7 @@ char *
|
||||
eval_hdata_count (const char *text, struct t_eval_context *eval_context)
|
||||
{
|
||||
struct t_hdata *hdata;
|
||||
unsigned long ptr_value;
|
||||
void *pointer;
|
||||
char *pos1, *pos2, *value, *hdata_name, *pointer_name, str_count[64];
|
||||
int rc, count;
|
||||
@@ -1181,9 +1182,10 @@ eval_hdata_count (const char *text, struct t_eval_context *eval_context)
|
||||
|
||||
if (strncmp (pointer_name, "0x", 2) == 0)
|
||||
{
|
||||
rc = sscanf (pointer_name, "%p", &pointer);
|
||||
rc = sscanf (pointer_name, "%lx", &ptr_value);
|
||||
if ((rc != EOF) && (rc != 0))
|
||||
{
|
||||
pointer = (void *)ptr_value;
|
||||
if (!hdata_check_pointer (hdata, NULL, pointer))
|
||||
goto end;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user