mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 01:04:06 +00:00
Fix wrong errormessage in case of encountering a broken replay.
This was SVN commit r17567.
This commit is contained in:
@@ -181,12 +181,18 @@ JS::Value VisualReplay::LoadReplayData(ScriptInterface& scriptInterface, OsPath&
|
||||
|
||||
// File must begin with "start"
|
||||
CStr type;
|
||||
if (!(*replayStream >> type).good() || type != "start")
|
||||
if (!(*replayStream >> type).good())
|
||||
{
|
||||
LOGERROR("Couldn't open %s. Non-latin characters are not supported yet.", fileName.c_str());
|
||||
SAFE_DELETE(replayStream);
|
||||
return JSVAL_NULL;
|
||||
}
|
||||
if (type != "start")
|
||||
{
|
||||
LOGWARNING("The replay %s is broken!", fileName.c_str());
|
||||
SAFE_DELETE(replayStream);
|
||||
return JSVAL_NULL;
|
||||
}
|
||||
|
||||
// Parse header / first line
|
||||
CStr header;
|
||||
|
||||
Reference in New Issue
Block a user