From 9f65e90b6043c86c89852355279165a8cf368528 Mon Sep 17 00:00:00 2001 From: elexis Date: Tue, 29 Dec 2015 14:00:30 +0000 Subject: [PATCH] Fix wrong errormessage in case of encountering a broken replay. This was SVN commit r17567. --- source/ps/VisualReplay.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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;