Core/Scripts: Limited possible phase number for EventMap to prevent overflows
This commit is contained in:
@@ -329,7 +329,7 @@ class EventMap : private std::map<uint32, uint32>
|
|||||||
// Sets event phase, must be in range 1 - 8
|
// Sets event phase, must be in range 1 - 8
|
||||||
void SetPhase(uint32 phase)
|
void SetPhase(uint32 phase)
|
||||||
{
|
{
|
||||||
if (phase && phase < 9)
|
if (phase && phase < 8)
|
||||||
_phase = (1 << (phase + 24));
|
_phase = (1 << (phase + 24));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -340,7 +340,7 @@ class EventMap : private std::map<uint32, uint32>
|
|||||||
time += _time;
|
time += _time;
|
||||||
if (groupId && groupId < 9)
|
if (groupId && groupId < 9)
|
||||||
eventId |= (1 << (groupId + 16));
|
eventId |= (1 << (groupId + 16));
|
||||||
if (phase && phase < 9)
|
if (phase && phase < 8)
|
||||||
eventId |= (1 << (phase + 24));
|
eventId |= (1 << (phase + 24));
|
||||||
const_iterator itr = find(time);
|
const_iterator itr = find(time);
|
||||||
while (itr != end())
|
while (itr != end())
|
||||||
|
|||||||
Reference in New Issue
Block a user