Fix Config parsing.

Wtf did that mean?

P.S. clang's warnings are awesome.
This commit is contained in:
Alexey Sokolov
2012-09-03 03:01:26 +07:00
parent 0bb18481f6
commit 19d5c8a7f0

View File

@@ -58,8 +58,10 @@ bool CConfig::Parse(CFile& file, CString& sErrorMsg)
std::stack<ConfigStackEntry> 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++;