From 75327637e73bed15dd1cb869f034183a03781752 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 26 Feb 2008 19:31:08 +0000 Subject: Fixes to make it run right :) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9038 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/configreader.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/configreader.cpp') diff --git a/src/configreader.cpp b/src/configreader.cpp index 7a7934f16..d0fff119f 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -1301,8 +1301,9 @@ bool ServerConfig::LoadConf(ConfigDataHash &target, FILE* &conf, const char* fil include_stack.push_back(filename); /* Start reading characters... */ - while ((ch = fgetc(conf))) + while (!feof(conf)) { + ch = fgetc(conf); /* * Fix for moronic windows issue spotted by Adremelech. @@ -1360,8 +1361,9 @@ bool ServerConfig::LoadConf(ConfigDataHash &target, FILE* &conf, const char* fil { line += ch; char real_character; - if ((real_character = fgetc(conf))) + if (!feof(conf)) { + real_character = fgetc(conf); if (real_character == 'n') real_character = '\n'; line += real_character; -- cgit v1.2.3