Fix static analysis issues

CID 1291964
CID 1292775

(cherry picked from commit 6767bbc95f46df4b62c8131a39a132d3f9bb8a26)

Conflicts:
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Spells/SpellHistory.h
	src/server/game/Spells/SpellInfo.cpp
This commit is contained in:
Shauren authored and Aokromes committed 2017-01-23 00:15:36 +01:00
1 parent 304ecbc8b1
commit bbcd694155
2 files changed
+11 -1

No files matched your search

@@ -163,6 +163,17 @@ namespace MMAP
return false;
}
long pos = ftell(file);
fseek(file, 0, SEEK_END);
if (static_cast<int32>(fileHeader.size) > ftell(file) - pos)
{
TC_LOG_ERROR("maps", "MMAP:loadMap: %03u%02i%02i.mmtile has corrupted data size", mapId, x, y);
fclose(file);
return false;
}
fseek(file, pos, SEEK_SET);
unsigned char* data = (unsigned char*)dtAlloc(fileHeader.size, DT_ALLOC_PERM);
ASSERT(data);
-1
View File
@@ -136,7 +136,6 @@ void SpellHistory::SaveToDB(SQLTransaction& trans)
void SpellHistory::Update()
{
SQLTransaction t;
Clock::time_point now = Clock::now();
for (auto itr = _categoryCooldowns.begin(); itr != _categoryCooldowns.end();)
{