From 4d43a245ad42b96e5f73c44b88e46419ca016d0c Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 8 Dec 2005 18:21:02 +0000 Subject: Reverted bugfix git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2275 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd_io.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/inspircd_io.cpp b/src/inspircd_io.cpp index 0cf28d3b8..4a83abc22 100644 --- a/src/inspircd_io.cpp +++ b/src/inspircd_io.cpp @@ -286,8 +286,6 @@ std::string ConfProcess(char* buffer, long linenumber, std::stringstream* errors return parsedata; } -/* A special version of fgets that will read \r, \n, \r\n or even \n\r, it doesnt care :-) */ - int fgets_safe(char* buffer, size_t maxsize, FILE* &file) { char c_read = '\0'; @@ -331,10 +329,9 @@ bool LoadConf(const char* filename, std::stringstream *target, std::stringstream { while (!feof(conf)) { - *buffer = 0; if (fgets_safe(buffer, MAXBUF, conf)) { - if ((buffer) && (strlen(buffer)) && (*buffer > '\r')) + if ((!feof(conf)) && (buffer) && (strlen(buffer))) { if ((buffer[0] != '#') && (buffer[0] != '\r') && (buffer[0] != '\n')) { @@ -738,4 +735,3 @@ int OpenTCPSocket (void) return (sockfd); } } - -- cgit v1.2.3