From 0179cb18110f5ab5b32fb060c0d00c2b87c007ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 7 Dec 2021 21:28:39 +0100 Subject: [PATCH] Very minor logging improvement --- Common/SysError.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Common/SysError.cpp b/Common/SysError.cpp index 2bf17740aa..c046b8f63b 100644 --- a/Common/SysError.cpp +++ b/Common/SysError.cpp @@ -50,7 +50,12 @@ std::string GetStringErrorMsg(int errCode) { char err_str[buff_size] = {}; snprintf(err_str, buff_size, "%s", ConvertWStringToUTF8(err_strw).c_str()); - return std::string(err_str); + + std::string err_string = err_str; + if (!err_string.empty() && err_string.back() == '\n') { + err_string.pop_back(); + } + return err_string; #else char err_str[buff_size] = {};