X-Git-Url: https://git.llucax.com/software/dgc/naive.git/blobdiff_plain/802aa7fc0eeb044538d371e936197752bbb53612..346f04b3e1026ded5af3ac95a483b2c3d05a6d60:/gc/dynarray.d diff --git a/gc/dynarray.d b/gc/dynarray.d index f0d5218..9836258 100644 --- a/gc/dynarray.d +++ b/gc/dynarray.d @@ -106,7 +106,7 @@ public: if (new_capacity == 0) new_capacity = 4; // reallocate the memory with the new_capacity - T* new_data = cast(T*) realloc(this.data, new_capacity); + T* new_data = cast(T*) realloc(this.data, new_capacity * T.sizeof); if (new_data is null) onOutOfMemoryError(); this.data = new_data;