From 185afa1e2523fa2d278b881d6606b73ae20098e9 Mon Sep 17 00:00:00 2001 From: divverent Date: Fri, 10 Apr 2009 19:48:07 +0000 Subject: [PATCH] fix a crash in RBSP reading git-svn-id: svn://svn.icculus.org/netradiant/trunk@318 61c419a2-8eb2-4b30-bcec-8cead039b335 --- tools/quake3/q3map2/bspfile_rbsp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ); -- 2.39.2