fix (core): Cast sub-expression to wider-type (#12430)

sub-expression may overflow before being added to a wider type.
Possible fix for a segmentation fault being reported in the chat.
This commit is contained in:
M'Dic
2022-08-13 15:05:23 -04:00
committed by GitHub
parent 3771a7120d
commit 5dd22f822d

View File

@@ -94,7 +94,7 @@ InstanceSave* InstanceSaveMgr::AddInstanceSave(uint32 mapId, uint32 instanceId,
}
else
{
resetTime = GameTime::GetGameTime().count() + 3 * DAY; // normals expire after 3 days even if someone is still bound to them, cleared on startup
resetTime = GameTime::GetGameTime().count() + static_cast<long long>(3) * DAY; // normals expire after 3 days even if someone is still bound to them, cleared on startup
extendedResetTime = 0;
}
InstanceSave* save = new InstanceSave(mapId, instanceId, difficulty, resetTime, extendedResetTime);