From 24e62993dffc75ab8ea168d65b542f084f851b5d Mon Sep 17 00:00:00 2001 From: bluma4862 Date: Sat, 5 Apr 2008 14:47:59 +0000 Subject: [PATCH] Fixed stuffextract crash for some maps with compilation under VC80 and newer --- src/tools/stuffextract/StuffExtract.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tools/stuffextract/StuffExtract.cpp b/src/tools/stuffextract/StuffExtract.cpp index c2aa751..66f6974 100644 --- a/src/tools/stuffextract/StuffExtract.cpp +++ b/src/tools/stuffextract/StuffExtract.cpp @@ -515,7 +515,8 @@ void ExtractMaps(void) printf("\nERROR: Map extraction failed: could not save file %s\n",wdt_out); return; } - wdt_fh.write((char*)wdt_bb.contents(),wdt_bb.size()); + if (wdt_bb.size()) + wdt_fh.write((char*)wdt_bb.contents(),wdt_bb.size()); wdt_fh.close(); printf("Extracted WDT '%s'\n",wdt_name);