diff --git a/source/ps/VisualReplay.cpp b/source/ps/VisualReplay.cpp index af7dba164d..be48949924 100644 --- a/source/ps/VisualReplay.cpp +++ b/source/ps/VisualReplay.cpp @@ -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;