Permalink
Browse files

Fix Config parsing.

Wtf did that mean?

P.S. clang's warnings are awesome.
  • Loading branch information...
1 parent 0bb1848 commit 19d5c8a7f0ecc8a42e1c9f5d0afccc1f102a2c81 @DarthGandalf DarthGandalf committed Sep 2, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/Config.cpp
View
@@ -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++;

0 comments on commit 19d5c8a

Please sign in to comment.