]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
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 6868f97467ba5f3e4574b5199384d5f13282d2d7..0a48aae6135de9f98162b0732ecb042d3b3e9a42 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 );