From 54aa4105b8974894e6cb557cd3a0d40b735dbed6 Mon Sep 17 00:00:00 2001 From: Username404 Date: Wed, 29 Sep 2021 18:32:36 +0200 Subject: [PATCH] Append new lines to the lineinput string instead of doing concatenation in filefuncs.cpp --- src/etc/filefuncs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/etc/filefuncs.cpp b/src/etc/filefuncs.cpp index 857b60c..cf60189 100644 --- a/src/etc/filefuncs.cpp +++ b/src/etc/filefuncs.cpp @@ -8,7 +8,7 @@ string getFileContent(const string& file) string lineinput, fullinput; fileStream.open(file, ios::in); if (fileStream.is_open()) while (getline(fileStream, lineinput)) { - fullinput.append(lineinput + "\n"); + fullinput.append(lineinput += '\n'); } else throw Yerbacon::Exception("Could not open \"" + file + "\"."); fileStream.close(); return fullinput;