mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
gactionmap: Check for < 0 in g_action_map_add_action_entries()
Assume that all negative values mean `NULL` terminated. Everything else will cause a disaster anyway.
This commit is contained in:
parent
ecbe360a38
commit
596fec811d
@ -222,7 +222,7 @@ g_action_map_add_action_entries (GActionMap *action_map,
|
||||
g_return_if_fail (G_IS_ACTION_MAP (action_map));
|
||||
g_return_if_fail (entries != NULL || n_entries == 0);
|
||||
|
||||
for (i = 0; n_entries == -1 ? entries[i].name != NULL : i < n_entries; i++)
|
||||
for (i = 0; n_entries < 0 ? entries[i].name != NULL : i < n_entries; i++)
|
||||
{
|
||||
const GActionEntry *entry = &entries[i];
|
||||
const GVariantType *parameter_type;
|
||||
|
Loading…
Reference in New Issue
Block a user