fix a crash in RBSP reading
authordivverent <divverent@61c419a2-8eb2-4b30-bcec-8cead039b335>
Fri, 10 Apr 2009 19:48:07 +0000 (19:48 +0000)
committerdivverent <divverent@61c419a2-8eb2-4b30-bcec-8cead039b335>
Fri, 10 Apr 2009 19:48:07 +0000 (19:48 +0000)
git-svn-id: svn://svn.icculus.org/netradiant/trunk@318 61c419a2-8eb2-4b30-bcec-8cead039b335

tools/quake3/q3map2/bspfile_rbsp.c

index 6868f97..0a48aae 100644 (file)
@@ -243,9 +243,9 @@ void LoadRBSPFile( const char *filename )
        
        numBSPLeafBrushes = CopyLump_Allocate( (bspHeader_t*) header, LUMP_LEAFBRUSHES, (void **) &bspLeafBrushes, sizeof( bspLeafBrushes[ 0 ] ), &allocatedBSPLeafBrushes );
        
-       numBSPBrushes = CopyLump_Allocate( (bspHeader_t*) header, LUMP_BRUSHES, &bspBrushes, sizeof( bspBrush_t ), &allocatedBSPLeafBrushes );
+       numBSPBrushes = CopyLump_Allocate( (bspHeader_t*) header, LUMP_BRUSHES, (void **) &bspBrushes, sizeof( bspBrush_t ), &allocatedBSPLeafBrushes );
        
-       numBSPBrushSides = CopyLump( (bspHeader_t*) header, LUMP_BRUSHSIDES, bspBrushSides, sizeof( bspBrushSide_t ) );
+       numBSPBrushSides = CopyLump_Allocate( (bspHeader_t*) header, LUMP_BRUSHSIDES, (void **) &bspBrushSides, sizeof( bspBrushSide_t ), &allocatedBSPBrushSides );
        
        numBSPDrawVerts = GetLumpElements( (bspHeader_t*) header, LUMP_DRAWVERTS, sizeof( bspDrawVerts[ 0 ] ) );
                SetDrawVerts( numBSPDrawVerts );