diff --git a/Source/generic_map.h b/Source/generic_map.h index ff1d92a..7261ca7 100644 --- a/Source/generic_map.h +++ b/Source/generic_map.h @@ -55,7 +55,7 @@ uint32_t fibHash(uint32_t hash, uint32_t shift); uint32_t cell; \ old[i].hash = cell = fibHash(hashFn(old[i].key), map->shift); \ while(new[cell].active) { \ - if(++cell > map->capacity) \ + if(++cell >= map->capacity) \ cell = 0; \ } \ new[cell] = old[i]; \ @@ -168,4 +168,4 @@ uint32_t fibHash(uint32_t hash, uint32_t shift); return true; \ } -#endif //GENERIC_MAP_GENERIC_MAP_H \ No newline at end of file +#endif //GENERIC_MAP_GENERIC_MAP_H