Skip to content

Commit

Permalink
Limit m_NumTimelineMarkers (reported by GG Kid)
Browse files Browse the repository at this point in the history
  • Loading branch information
def- committed Jan 23, 2018
1 parent 39cb6ad commit dd7281e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/engine/shared/demo.cpp
Expand Up @@ -738,8 +738,8 @@ int CDemoPlayer::Load(class IStorage *pStorage, class IConsole *pConsole, const
// get timeline markers
int Num = ((m_Info.m_TimelineMarkers.m_aNumTimelineMarkers[0]<<24)&0xFF000000) | ((m_Info.m_TimelineMarkers.m_aNumTimelineMarkers[1]<<16)&0xFF0000) |
((m_Info.m_TimelineMarkers.m_aNumTimelineMarkers[2]<<8)&0xFF00) | (m_Info.m_TimelineMarkers.m_aNumTimelineMarkers[3]&0xFF);
m_Info.m_Info.m_NumTimelineMarkers = Num;
for(int i = 0; i < Num && i < MAX_TIMELINE_MARKERS; i++)
m_Info.m_Info.m_NumTimelineMarkers = min(Num, (int)MAX_TIMELINE_MARKERS);
for(int i = 0; i < m_Info.m_Info.m_NumTimelineMarkers; i++)
{
char *pTimelineMarker = m_Info.m_TimelineMarkers.m_aTimelineMarkers[i];
m_Info.m_Info.m_aTimelineMarkers[i] = ((pTimelineMarker[0]<<24)&0xFF000000) | ((pTimelineMarker[1]<<16)&0xFF0000) |
Expand Down

0 comments on commit dd7281e

Please sign in to comment.