Commit 755df9f1 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont
Browse files

vlc_arrays.h: Make sure we return the right value associated with a given key.

parent 6fba236c
......@@ -457,13 +457,10 @@ vlc_dictionary_value_for_key( const vlc_dictionary_t * p_dict, const char * psz_
int i_pos = DictHash( psz_key, p_dict->i_size );
struct vlc_dictionary_entry_t * p_entry = p_dict->p_entries[i_pos];
if( p_entry && !p_entry->p_next )
return p_entry->p_value;
if( !p_entry )
return kVLCDictionaryNotFound;
/* Hash collision */
/* Make sure we return the right item. (Hash collision) */
do {
if( !strcmp( psz_key, p_entry->psz_key ) )
return p_entry->p_value;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment