|
@@ -49,9 +49,9 @@ void vec_c_resize_to(void** data, size_t* size, size_t elem_size, size_t new_siz
|
|
|
|
|
|
size_t npot = nextPOT(new_size);
|
|
|
|
|
|
- tmp = realloc(*data, *size * elem_size);
|
|
|
+ tmp = realloc(*data, npot * elem_size);
|
|
|
if(!tmp) {
|
|
|
- fprintf(stderr, "Out of memory in vector resize, %ld bytes requested\n", *size);
|
|
|
+ fprintf(stderr, "Out of memory in vector resize, %ld bytes requested\n", npot);
|
|
|
return;
|
|
|
}
|
|
|
|