From e6d078dd852f0d2cbaf04a258e4f3afa00e43234 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 8 Mar 2017 01:20:31 +0300 Subject: Fix assert in creation default main configuration file. --- src/configmanager.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/configmanager.cpp b/src/configmanager.cpp index f95d98f4e..8f0ec3002 100644 --- a/src/configmanager.cpp +++ b/src/configmanager.cpp @@ -142,8 +142,14 @@ void ConfigManager::initConfiguration() FILE *configFile = fopen(configPath.c_str(), "r"); if (!configFile) { - configFile = fopen(configPath.c_str(), "wt"); + configFile = fopen(configPath.c_str(), "wb"); logger->log1("Creating new config"); + if (configFile) + { + fputs("\n", configFile); + fputs("\n", configFile); + fputs("\n", configFile); + } } if (!configFile) { -- cgit v1.2.3-70-g09d2