mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
Fix static analysis issues
CID 1291964
CID 1292775
(cherry picked from commit 6767bbc95f)
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:
@@ -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);
|
||||
|
||||
|
||||
@@ -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();)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user