aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp1
-rw-r--r--src/server/game/Server/Packets/MiscPackets.h12
-rw-r--r--src/server/shared/DataStores/DB2StorageLoader.cpp4
-rw-r--r--src/tools/map_extractor/dbcfile.cpp3
-rw-r--r--src/tools/vmap4_extractor/dbcfile.cpp3
5 files changed, 15 insertions, 8 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 0232c6de900..27ecbc10dc6 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -12180,6 +12180,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
uint32 Id = i->aura->GetId();
AuraApplication* aurApp = i->aura->GetApplicationOfTarget(GetGUID());
+ ASSERT(aurApp);
bool prepare = i->aura->CallScriptPrepareProcHandlers(aurApp, eventInfo);
diff --git a/src/server/game/Server/Packets/MiscPackets.h b/src/server/game/Server/Packets/MiscPackets.h
index acfb3115d50..b1da6e504a2 100644
--- a/src/server/game/Server/Packets/MiscPackets.h
+++ b/src/server/game/Server/Packets/MiscPackets.h
@@ -229,7 +229,7 @@ namespace WorldPackets
void Read() override;
- int32 DifficultyID;
+ int32 DifficultyID = 0;
};
class SetRaidDifficulty final : public ClientPacket
@@ -239,8 +239,8 @@ namespace WorldPackets
void Read() override;
- int32 DifficultyID;
- uint8 Legacy;
+ int32 DifficultyID = 0;
+ uint8 Legacy = 0;
};
class DungeonDifficultySet final : public ServerPacket
@@ -250,7 +250,7 @@ namespace WorldPackets
WorldPacket const* Write() override;
- int32 DifficultyID;
+ int32 DifficultyID = 0;
};
class RaidDifficultySet final : public ServerPacket
@@ -260,8 +260,8 @@ namespace WorldPackets
WorldPacket const* Write() override;
- int32 DifficultyID;
- uint8 Legacy;
+ int32 DifficultyID = 0;
+ uint8 Legacy = 0;
};
class CorpseReclaimDelay : public ServerPacket
diff --git a/src/server/shared/DataStores/DB2StorageLoader.cpp b/src/server/shared/DataStores/DB2StorageLoader.cpp
index fa8a12bb9b4..75cb01d00cd 100644
--- a/src/server/shared/DataStores/DB2StorageLoader.cpp
+++ b/src/server/shared/DataStores/DB2StorageLoader.cpp
@@ -545,7 +545,11 @@ char* DB2DatabaseLoader::Load(const char* format, int32 preparedStatement, uint3
} while (result->NextRow());
if (!newRecords)
+ {
+ delete[] tempDataTable;
+ delete[] newIndexes;
return nullptr;
+ }
// Compact new data table to only contain new records not previously loaded from file
char* dataTable = new char[newRecords * recordSize];
diff --git a/src/tools/map_extractor/dbcfile.cpp b/src/tools/map_extractor/dbcfile.cpp
index 893756321dd..edbcd82994f 100644
--- a/src/tools/map_extractor/dbcfile.cpp
+++ b/src/tools/map_extractor/dbcfile.cpp
@@ -21,7 +21,8 @@
#include "dbcfile.h"
DBCFile::DBCFile(HANDLE file) :
- _file(file), _data(NULL), _stringTable(NULL)
+ _file(file), _recordSize(0), _recordCount(0), _fieldCount(0),
+ _stringSize(0), _data(NULL), _stringTable(NULL)
{
}
diff --git a/src/tools/vmap4_extractor/dbcfile.cpp b/src/tools/vmap4_extractor/dbcfile.cpp
index dca549c398f..6ae165da508 100644
--- a/src/tools/vmap4_extractor/dbcfile.cpp
+++ b/src/tools/vmap4_extractor/dbcfile.cpp
@@ -21,7 +21,8 @@
#include "dbcfile.h"
DBCFile::DBCFile(HANDLE mpq, const char* filename) :
- _mpq(mpq), _filename(filename), _file(NULL), _data(NULL), _stringTable(NULL)
+ _mpq(mpq), _filename(filename), _file(NULL), _recordSize(0), _recordCount(0),
+ _fieldCount(0), _stringSize(0), _data(NULL), _stringTable(NULL)
{
}