diff options
author | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-05-10 00:04:14 +0000 |
---|---|---|
committer | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-05-10 00:04:14 +0000 |
commit | e7c95d470d08ed4da36e1bdc863903246c2d9683 (patch) | |
tree | 6e57bf2f0b3e1b356e4fe6c5e844f62f663dc371 /src | |
parent | 3fb96ec5df7d91a263ec9d3cae61b3372c4fddf3 (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')
-rw-r--r-- | src/configreader.cpp | 3 |
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 |