]> jfr.im git - irc/rizon/znc.git/commitdiff
Fix Config parsing.
authorAlexey Sokolov <redacted>
Sun, 2 Sep 2012 20:01:26 +0000 (03:01 +0700)
committerAlexey Sokolov <redacted>
Sun, 2 Sep 2012 20:01:26 +0000 (03:01 +0700)
Wtf did that mean?

P.S. clang's warnings are awesome.

src/Config.cpp

index 838803e6406dc43e685e8250ab617c957a8d9856..3b13cf8fddda0fe63bfce5199b0aa4d6f71a32b2 100644 (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++;