Merge branch 'working'

This commit is contained in:
Sean Barrett 2021-06-04 11:18:16 -07:00
commit 6b647c0257

View File

@ -379,6 +379,7 @@ CREDITS
Andreas Molzer
github:hashitaku
github:srdjanstipic
Macoy Madson
*/
#ifdef STBDS_UNIT_TESTS
@ -1381,6 +1382,8 @@ void *stbds_hmput_key(void *a, size_t elemsize, void *key, size_t keysize, int m
if (bucket->hash[i] == hash) {
if (stbds_is_key_equal(raw_a, elemsize, key, keysize, keyoffset, mode, bucket->index[i])) {
stbds_temp(a) = bucket->index[i];
if (mode >= STBDS_HM_STRING)
stbds_temp_key(a) = * (char **) ((char *) raw_a + elemsize*bucket->index[i] + keyoffset);
return STBDS_ARR_TO_HASH(a,elemsize);
}
} else if (bucket->hash[i] == 0) {