diff --git a/contrib/vmap_extractor_v2/vmapextract/vmapexport.cpp b/contrib/vmap_extractor_v2/vmapextract/vmapexport.cpp index 32ff7970c..24ca6414c 100644 --- a/contrib/vmap_extractor_v2/vmapextract/vmapexport.cpp +++ b/contrib/vmap_extractor_v2/vmapextract/vmapexport.cpp @@ -24,7 +24,7 @@ #define __STORMLIB_SELF__ // Don't use StormLib.lib #include "StormLib.h" -#pragma warning(disable : 4505) +#pragma warning(disable : 4505) #pragma comment(lib, "Winmm.lib") //From Extractor @@ -44,7 +44,8 @@ typedef unsigned char uint8; typedef unsigned short uint16; typedef unsigned int uint32; -typedef struct{ +typedef struct +{ char name[64]; unsigned int id; }map_id; @@ -208,14 +209,17 @@ int ExtractWmo(const std::vector& pArchiveNames) // Close the search handle if(hFind != NULL) SFileFindClose(hFind); - } } + // Close both archives if(hMpq != NULL) + { //SFileCloseArchive(hMpq); - if(nError == ERROR_SUCCESS) - printf("\nExtract wmo complete (No errors)\n"); + } + + if(nError == ERROR_SUCCESS) + printf("\nExtract wmo complete (No errors)\n"); return nError; } diff --git a/contrib/vmap_extractor_v2/vmapextract/wdtfile.cpp b/contrib/vmap_extractor_v2/vmapextract/wdtfile.cpp index 8d3fb6358..697f9b33b 100644 --- a/contrib/vmap_extractor_v2/vmapextract/wdtfile.cpp +++ b/contrib/vmap_extractor_v2/vmapextract/wdtfile.cpp @@ -106,7 +106,8 @@ WDTFile::~WDTFile(void) ADTFile* WDTFile::GetMap(int x, int z) { - if(!(x>=0 && z >= 0 && x<64 && z<64)) return NULL; + if(!(x>=0 && z >= 0 && x<64 && z<64)) + return NULL; char name[512];