Merge branch 'working'
This commit is contained in:
commit
6b647c0257
3
stb_ds.h
3
stb_ds.h
@ -379,6 +379,7 @@ CREDITS
|
|||||||
Andreas Molzer
|
Andreas Molzer
|
||||||
github:hashitaku
|
github:hashitaku
|
||||||
github:srdjanstipic
|
github:srdjanstipic
|
||||||
|
Macoy Madson
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef STBDS_UNIT_TESTS
|
#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 (bucket->hash[i] == hash) {
|
||||||
if (stbds_is_key_equal(raw_a, elemsize, key, keysize, keyoffset, mode, bucket->index[i])) {
|
if (stbds_is_key_equal(raw_a, elemsize, key, keysize, keyoffset, mode, bucket->index[i])) {
|
||||||
stbds_temp(a) = 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);
|
return STBDS_ARR_TO_HASH(a,elemsize);
|
||||||
}
|
}
|
||||||
} else if (bucket->hash[i] == 0) {
|
} else if (bucket->hash[i] == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user