common: zero the bsp structure before calling CopyLump
Stops CopyLump from trying to free using random pointers. Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
parent
bc0de585ff
commit
3e660b291a
|
|
@ -376,6 +376,7 @@ LoadBSPFile(const char *filename)
|
|||
}
|
||||
|
||||
/* copy the data */
|
||||
memset(&bsp, 0, sizeof(bsp));
|
||||
bsp.nummodels = CopyLump(header, LUMP_MODELS, &bsp.dmodels);
|
||||
bsp.numvertexes = CopyLump(header, LUMP_VERTEXES, &bsp.dvertexes);
|
||||
bsp.numplanes = CopyLump(header, LUMP_PLANES, &bsp.dplanes);
|
||||
|
|
|
|||
Loading…
Reference in New Issue