mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-24 13:06:14 +01:00
GSettings: fix mixed use of a pointer
- used in some places as a move-along-as-we-go pointer - used in other places as a pointer to the fixed base of an array Switch all users to the first style to avoid a crasher.
This commit is contained in:
parent
5821b7f099
commit
644dfbd704
@ -453,7 +453,6 @@ g_settings_backend_flatten_tree (GTree *tree,
|
||||
{
|
||||
FlattenState state = { 0, };
|
||||
gsize nnodes;
|
||||
gsize i;
|
||||
|
||||
nnodes = g_tree_nnodes (tree);
|
||||
|
||||
@ -470,8 +469,8 @@ g_settings_backend_flatten_tree (GTree *tree,
|
||||
g_return_if_fail (*keys + nnodes == state.keys);
|
||||
|
||||
*path = state.prefix;
|
||||
for (i = 0; i < nnodes; i++)
|
||||
state.keys[i] += state.prefix_len;
|
||||
while (nnodes--)
|
||||
*--state.keys += state.prefix_len;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user