From ad13c9542b7eccb7082e08e78a310e72e22f06f3 Mon Sep 17 00:00:00 2001 From: D-AIRY <admin@ds-servers.com> Date: Tue, 2 Jan 2018 12:22:58 +0300 Subject: [PATCH] BUG#144 fixed --- source/core/Config.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/core/Config.cpp b/source/core/Config.cpp index 481308860..876016798 100644 --- a/source/core/Config.cpp +++ b/source/core/Config.cpp @@ -90,7 +90,8 @@ int CConfig::parse(const char* file) char c; char cn = 0; - while(!feof(fp)) + bool isRunning = true; + while(isRunning) { if(cn) { @@ -100,6 +101,11 @@ int CConfig::parse(const char* file) else { c = fgetc(fp); + if(feof(fp)) + { + c = '\n'; + isRunning = false; + } } if(bSectionNameDone) { -- GitLab