mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 11:26:16 +01:00
dataset: Do not increment
Do not increment the `data` pointer when it points to an item that has not been inspected. Helps https://gitlab.gnome.org/GNOME/glib/-/issues/2672
This commit is contained in:
parent
ebfbef1acd
commit
8c4598aab3
@ -528,11 +528,8 @@ g_data_remove_internal (GData **datalist,
|
||||
old[found_keys] = *data;
|
||||
found_keys++;
|
||||
|
||||
if (data < data_end)
|
||||
{
|
||||
data_end--;
|
||||
*data = *data_end;
|
||||
}
|
||||
if (data < --data_end)
|
||||
*data = *data_end;
|
||||
|
||||
d->len--;
|
||||
|
||||
@ -546,8 +543,10 @@ g_data_remove_internal (GData **datalist,
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
data++;
|
||||
else
|
||||
{
|
||||
data++;
|
||||
}
|
||||
}
|
||||
|
||||
if (found_keys > 0)
|
||||
|
Loading…
Reference in New Issue
Block a user