]> git.llucax.com Git - software/dgc/naive.git/blobdiff - gc/dynarray.d
Move cell allocation and freeing to Cell struct
[software/dgc/naive.git] / gc / dynarray.d
index f0d5218b7dce1c968f59af781c6c20292954aabb..9836258ccda597e323ba6b2b432268e297bd3228 100644 (file)
@@ -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;