mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
fixed infinite loop when playing empty demo. Closes #248
This commit is contained in:
parent
9e39239ce2
commit
039de7e1ac
|
@ -406,7 +406,13 @@ void CDemoPlayer::DoTick()
|
||||||
{
|
{
|
||||||
// stop on error or eof
|
// stop on error or eof
|
||||||
m_pConsole->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "demo_player", "end of file");
|
m_pConsole->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "demo_player", "end of file");
|
||||||
Pause();
|
if(m_Info.m_PreviousTick == -1)
|
||||||
|
{
|
||||||
|
m_pConsole->Print(IConsole::OUTPUT_LEVEL_STANDARD, "demo_player", "empty demo");
|
||||||
|
Stop();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Pause();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue