diff --git a/dlls/scrrun/dictionary.c b/dlls/scrrun/dictionary.c index 631d0b0619d..844b4d11542 100644 --- a/dlls/scrrun/dictionary.c +++ b/dlls/scrrun/dictionary.c @@ -154,10 +154,11 @@ static struct keyitem_pair *get_keyitem_pair(dictionary *dict, VARIANT *key) if (FAILED(hr)) return NULL; - entry = head = get_bucket_head(dict, V_I4(&hash)); + head = get_bucket_head(dict, V_I4(&hash)); if (!head->next || list_empty(head)) return NULL; + entry = list_head(head); do { pair = LIST_ENTRY(entry, struct keyitem_pair, bucket); if (is_matching_key(dict, pair, key, V_I4(&hash))) return pair;