From 74a687ffac8fe999e6101892c37fb7d57fe26843 Mon Sep 17 00:00:00 2001 From: LightCat Date: Thu, 18 Oct 2018 15:12:49 +0200 Subject: [PATCH] fix cat_load newline issue --- src/settings/SettingCommands.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/settings/SettingCommands.cpp b/src/settings/SettingCommands.cpp index e59d07a4..1ecb9b92 100644 --- a/src/settings/SettingCommands.cpp +++ b/src/settings/SettingCommands.cpp @@ -110,6 +110,9 @@ void load_thread(const int ArgC, const std::string ArgS) } else { + std::string backup = ArgS; + std::string ArgS = backup; + ArgS.erase(std::remove(ArgS.begin(), ArgS.end(), '\n'), ArgS.end()); #if ENABLE_VISUALS loader.loadFrom(std::string(DATA_PATH "/configs/") + ArgS + ".conf"); #else