]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/bspfile_rbsp.c
fix drawindexes crash when loading BSP files
[xonotic/netradiant.git] / tools / quake3 / q3map2 / bspfile_rbsp.c
index 644f1f5f97c8289673e7c04386f3a129cc5ff5ec..22ead1844b626d02e5e0259012143f8fa90ec6ee 100644 (file)
@@ -257,7 +257,7 @@ void LoadRBSPFile( const char *filename )
        
        numBSPFogs = CopyLump( (bspHeader_t*) header, LUMP_FOGS, bspFogs, sizeof( bspFogs[ 0 ] ) );
        
-       numBSPDrawIndexes = CopyLump( (bspHeader_t*) header, LUMP_DRAWINDEXES, bspDrawIndexes, sizeof( bspDrawIndexes[ 0 ] ) );
+       numBSPDrawIndexes = CopyLump_Allocate( (bspHeader_t*) header, LUMP_DRAWINDEXES, (void **) &bspDrawIndexes, sizeof( bspDrawIndexes[ 0 ] ), &allocatedBSPDrawIndexes );
        
        numBSPVisBytes = CopyLump( (bspHeader_t*) header, LUMP_VISIBILITY, bspVisBytes, 1 );