maybe teeny tiny progress

foudn bug where I was passing around void ** rather than void * into
some places
This commit is contained in:
2026-05-05 23:09:54 +02:00
parent d0d98170ea
commit 3b980dd4e4
+2 -2
View File
@@ -234,7 +234,7 @@ void map_assure_growable_by_1(void **this, const char *file, int line) {
// The reason for re-hashing is that all hashes are moduloed by the // The reason for re-hashing is that all hashes are moduloed by the
// size of the mapping array, so the resulting hash will likely change. // size of the mapping array, so the resulting hash will likely change.
for ( unsigned int i = 0; i < header->n_items; i++ ) { for ( unsigned int i = 0; i < header->n_items; i++ ) {
void *pair = &this[i*header->item_size]; void *pair = &(*this)[i*header->item_size];
// This is okay, because we absolutely know that the keys don't already // This is okay, because we absolutely know that the keys don't already
// exist. (assuming all the other code for map is doing it's job) // exist. (assuming all the other code for map is doing it's job)
@@ -243,7 +243,7 @@ void map_assure_growable_by_1(void **this, const char *file, int line) {
// TODO!!! // TODO!!!
// TODO!!! // TODO!!!
// TODO!!! // TODO!!!
unsigned int mapping_index = map_pair_hash(this, pair).new_index; unsigned int mapping_index = map_pair_hash(*this, pair).new_index;
header->mapping_arr[mapping_index] = i; header->mapping_arr[mapping_index] = i;
} }
} }