summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-08 18:21:02 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-08 18:21:02 +0000
commit4d43a245ad42b96e5f73c44b88e46419ca016d0c (patch)
tree4a7b00ae26b04d5da5f81fc44c1e2d284718756f
parentc09e928d6dd87c1a2dea7347d2e97e0c7e30182f (diff)
Reverted bugfix
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2275 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/inspircd_io.cpp6
1 files changed, 1 insertions, 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);
}
}
-