Noggit3 : extendable array: prevent use after extend
https://github.com/wowdev/noggit3/pull/91
+ adspartan mapchunk: store pointer to the header when saving f7e5f8396f
This commit is contained in:
@@ -190,7 +190,7 @@ void MapIndex::save()
|
||||
|
||||
//Log << "Saving WDT \"" << filename << "\"." << std::endl;
|
||||
|
||||
sExtendableArray wdtFile = sExtendableArray();
|
||||
util::sExtendableArray wdtFile;
|
||||
int curPos = 0;
|
||||
|
||||
// MVER
|
||||
@@ -266,7 +266,7 @@ void MapIndex::save()
|
||||
|
||||
BlizzardArchive::ClientFile f(filename.str(), Noggit::Application::NoggitApplication::instance()->clientData(),
|
||||
BlizzardArchive::ClientFile::NEW_FILE);
|
||||
f.setBuffer(wdtFile.data);
|
||||
f.setBuffer(wdtFile.all_data());
|
||||
f.save();
|
||||
f.close();
|
||||
|
||||
@@ -1240,7 +1240,7 @@ void MapIndex::create_empty_wdl() const
|
||||
filename << "World\\Maps\\" << basename << "\\" << basename << ".wdl"; // mapIndex.basename ?
|
||||
//Log << "Saving WDL \"" << filename << "\"." << std::endl;
|
||||
|
||||
sExtendableArray wdlFile = sExtendableArray();
|
||||
util::sExtendableArray wdlFile;
|
||||
int curPos = 0;
|
||||
|
||||
// MVER
|
||||
@@ -1340,7 +1340,7 @@ void MapIndex::create_empty_wdl() const
|
||||
|
||||
BlizzardArchive::ClientFile f(filename.str(), Noggit::Application::NoggitApplication::instance()->clientData(),
|
||||
BlizzardArchive::ClientFile::NEW_FILE);
|
||||
f.setBuffer(wdlFile.data);
|
||||
f.setBuffer(wdlFile.all_data());
|
||||
f.save();
|
||||
f.close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user