From dc5c83eb60f88934e4b99dec6b41aa248481d543 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Tue, 22 May 2018 15:11:58 +0000 Subject: [PATCH] Only add return to buffer if it already contains data, which fixes extra return in generated autoexec.bat. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4103 --- src/misc/setup.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/misc/setup.cpp b/src/misc/setup.cpp index 957ef08f..1c44ef7e 100644 --- a/src/misc/setup.cpp +++ b/src/misc/setup.cpp @@ -649,8 +649,8 @@ string Section_prop::GetPropValue(string const& _property) const { } bool Section_line::HandleInputline(string const& line) { - data+=line; - data+="\n"; + if (!data.empty()) data += "\n"; //Add return to previous line in buffer + data += line; return true; }