Fix a subtle bug in NamedArray (thanks @Chilly Willy!)

This commit is contained in:
Luke Benstead 2018-08-21 15:50:27 +01:00
parent 8b834ac3f1
commit 0d69740231

View File

@ -26,7 +26,7 @@ void named_array_init(NamedArray* array, unsigned int element_size, unsigned int
array->elements = (unsigned char*) malloc(element_size * max_elements);
array->used_markers = (unsigned char*) malloc(array->marker_count);
#endif
memset(array->used_markers, 0, sizeof(array->marker_count));
memset(array->used_markers, 0, sizeof(unsigned char) * array->marker_count);
}
char named_array_used(NamedArray* array, unsigned int id) {