summaryrefslogtreecommitdiff
path: root/src/configreader.cpp
diff options
context:
space:
mode:
authorpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-10 00:04:14 +0000
committerpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-10 00:04:14 +0000
commite7c95d470d08ed4da36e1bdc863903246c2d9683 (patch)
tree6e57bf2f0b3e1b356e4fe6c5e844f62f663dc371 /src/configreader.cpp
parent3fb96ec5df7d91a263ec9d3cae61b3372c4fddf3 (diff)
Fix LoadConf always reading 1 extra byte of random garbage.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9691 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index e45a76b40..2ee6ace26 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -1333,9 +1333,8 @@ bool ServerConfig::LoadConf(ConfigDataHash &target, FILE* &conf, const char* fil
include_stack.push_back(filename);
/* Start reading characters... */
- while (!feof(conf))
+ while ((ch = fgetc(conf)) != EOF)
{
- ch = fgetc(conf);
/*
* Fix for moronic windows issue spotted by Adremelech.
* Some windows editors save text files as utf-16, which is