diff options
-rw-r--r-- | src/inspircd_io.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/inspircd_io.cpp b/src/inspircd_io.cpp index 4d2369d23..8c870af0f 100644 --- a/src/inspircd_io.cpp +++ b/src/inspircd_io.cpp @@ -331,9 +331,11 @@ bool LoadConf(const char* filename, std::stringstream *target, std::stringstream { while (!feof(conf)) { + *buffer = 0; if (fgets_safe(buffer, MAXBUF, conf)) { - if ((!feof(conf)) && (buffer) && (strlen(buffer))) + /*if ((!feof(conf)) && (buffer) && (strlen(buffer)))*/ + if ((buffer) && (strlen(buffer)) && (*buffer > '\r')) { if ((buffer[0] != '#') && (buffer[0] != '\r') && (buffer[0] != '\n')) { @@ -396,16 +398,6 @@ bool LoadConf(const char* filename, std::stringstream *target, std::stringstream } } } - if (*buffer) - { - bool error = false; - std::string data = ConfProcess(buffer,linenumber++,errorstream,error,filename); - if (error) - { - return false; - } - *target << data; - } fclose(conf); } target->seekg(0); |