Просмотр исходного кода

Fixed warning: ‘new_item.probe_len’ may be used uninitialized in this function

Sam Lantinga 11 месяцев назад
Родитель
Сommit
4b7c5f561b
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      src/SDL_hashtable.c

+ 1 - 0
src/SDL_hashtable.c

@@ -307,6 +307,7 @@ bool SDL_InsertIntoHashTable(SDL_HashTable *table, const void *key, const void *
     new_item.value = value;
     new_item.hash = hash;
     new_item.live = true;
+    new_item.probe_len = 0;
 
     table->num_occupied_slots++;