]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - zone.c
Move Mem_strdup into zone.c
[xonotic/darkplaces.git] / zone.c
diff --git a/zone.c b/zone.c
index 68958fd06371f8805926218f2b393a569333dac4..a945a85084be6d9c85301e19111825b319a3bb0c 100644 (file)
--- a/zone.c
+++ b/zone.c
@@ -393,7 +393,7 @@ void Mem_ExpandableArray_FreeArray(memexpandablearray_t *l)
        size_t i;
        if (l->maxarrays)
        {
-               for (i = 0;i != l->numarrays;l++)
+               for (i = 0;i != l->numarrays;i++)
                        Mem_Free(l->arrays[i].data);
                Mem_Free(l->arrays);
        }
@@ -553,10 +553,20 @@ void MemStats_f(void)
 {
        Mem_CheckSentinelsGlobal();
        R_TextureStats_Print(false, false, true);
+       GL_Mesh_ListVBOs(false);
        Mem_PrintStats();
 }
 
 
+char* Mem_strdup (mempool_t *pool, const char* s)
+{
+       char* p;
+       if (s == NULL) return NULL;
+       p = (char*)Mem_Alloc (pool, strlen (s) + 1);
+       strcpy (p, s);
+       return p;
+}
+
 /*
 ========================
 Memory_Init