diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-02-26 19:31:08 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-02-26 19:31:08 +0000 |
commit | 75327637e73bed15dd1cb869f034183a03781752 (patch) | |
tree | f1d892c22d7f2c37569243378f907155ac70055a | |
parent | 9ce18436e94c2cdebeba90eba30b3c3e1ca311ed (diff) |
Fixes to make it run right :)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9038 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/configreader.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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; |