From 19d5c8a7f0ecc8a42e1c9f5d0afccc1f102a2c81 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Mon, 3 Sep 2012 03:01:26 +0700 Subject: [PATCH] Fix Config parsing. Wtf did that mean? P.S. clang's warnings are awesome. --- src/Config.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Config.cpp b/src/Config.cpp index 838803e6..3b13cf8f 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -58,8 +58,10 @@ bool CConfig::Parse(CFile& file, CString& sErrorMsg) std::stack ConfigStack; bool bCommented = false; // support for /**/ style comments - if (!file.Seek(0)) - return "Could not seek to the beginning of the config."; + if (!file.Seek(0)) { + sErrorMsg = "Could not seek to the beginning of the config."; + return false; + } while (file.ReadLine(sLine)) { uLineNum++;