From: divverent Date: Fri, 10 Apr 2009 19:48:07 +0000 (+0000) Subject: fix a crash in RBSP reading X-Git-Tag: svn-r421~102 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=185afa1e2523fa2d278b881d6606b73ae20098e9;p=xonotic%2Fnetradiant.git fix a crash in RBSP reading git-svn-id: svn://svn.icculus.org/netradiant/trunk@318 61c419a2-8eb2-4b30-bcec-8cead039b335 --- diff --git a/tools/quake3/q3map2/bspfile_rbsp.c b/tools/quake3/q3map2/bspfile_rbsp.c index 6868f974..0a48aae6 100644 --- a/tools/quake3/q3map2/bspfile_rbsp.c +++ b/tools/quake3/q3map2/bspfile_rbsp.c @@ -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 );