From 0ce32a793e08c612ff5290e87f92af88133ddc1c Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 7 Sep 2012 20:40:58 +0900 Subject: [PATCH] Return the correct size for set_bsp*_write(). Need to subtract the size of the bsp_t/bsp29_t struct. Now old and new qfbsp produce identical bsps (so long as they're both unoptimized, or (probably) both optimized). --- libs/util/bspfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/util/bspfile.c b/libs/util/bspfile.c index 9ac610e86..82911b113 100644 --- a/libs/util/bspfile.c +++ b/libs/util/bspfile.c @@ -838,7 +838,7 @@ do { \ SET_LUMP (LUMP_ENTITIES, entdata); SET_LUMP (LUMP_TEXTURES, texdata); - *_size = size; + *_size = size - sizeof (*tbsp); return tbsp; } @@ -924,7 +924,7 @@ do { \ SET_LUMP (LUMP_ENTITIES, entdata); SET_LUMP (LUMP_TEXTURES, texdata); - *_size = size; + *_size = size - sizeof (*tbsp); return tbsp; }