Core/Misc: Fix static analysis issues
This commit is contained in:
1 parent
453cd30eb7
commit
3410edfdae
2 files changed
+2
-1
No files matched your search
@@ -165,7 +165,7 @@ namespace MMAP
|
||||
|
||||
long pos = ftell(file);
|
||||
fseek(file, 0, SEEK_END);
|
||||
if (static_cast<int32>(fileHeader.size) > ftell(file) - pos)
|
||||
if (pos < 0 || 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);
|
||||
|
||||
@@ -315,6 +315,7 @@ Player::Player(WorldSession* session): Unit(true)
|
||||
m_session = session;
|
||||
|
||||
m_ingametime = 0;
|
||||
m_sharedQuestId = 0;
|
||||
|
||||
m_ExtraFlags = 0;
|
||||
|
||||
|
||||
Reference in new issue
Block a user