diff options
author | Ryan Lortie <desrt@desrt.ca> | 2012-02-03 10:03:17 -0500 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2012-02-03 10:05:39 -0500 |
commit | 33f32ba175c6192d500ed7081d3cf973e724379a (patch) | |
tree | d83db1af25ad04cfad48c5417b530f5b47387a5a | |
parent | 7131b6eb1ac1fdf62cfefeaf41def9187ffdc062 (diff) | |
download | dconf-33f32ba175c6192d500ed7081d3cf973e724379a.tar.gz |
engine: fix checking for locks
The algorithm that checked for locks essentially answers the question of
"what is the highest level database that we should consider results
from?". In the case of only one database, its answer to this question
could be out of range of the set of databases that we asked it to search
in.
Correct this problem by bounding the starting point of the search
accordingly.
Reported by Didier Roche.
-rw-r--r-- | engine/dconf-engine.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engine/dconf-engine.c b/engine/dconf-engine.c index 8f5c613..c3b28ff 100644 --- a/engine/dconf-engine.c +++ b/engine/dconf-engine.c @@ -397,7 +397,7 @@ dconf_engine_read_internal (DConfEngine *engine, * ensure that values in the user database are always ignored when * locks are present. */ - for (i = engine->n_dbs - 1; lowest < i; i--) + for (i = MAX (engine->n_dbs - 1, lowest); lowest < i; i--) if (engine->lock_tables[i] != NULL && gvdb_table_has_value (engine->lock_tables[i], key)) break; |