From e7c95d470d08ed4da36e1bdc863903246c2d9683 Mon Sep 17 00:00:00 2001 From: peavey Date: Sat, 10 May 2008 00:04:14 +0000 Subject: 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 --- src/configreader.cpp | 3 +-- 1 file changed, 1 insertion(+), 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 -- cgit v1.2.3