From db0c3cefcdba4eb3150c3e47c3da0c5e6230cf7b Mon Sep 17 00:00:00 2001 From: Nemoumbra Date: Thu, 14 May 2026 01:52:11 +0300 Subject: [PATCH] Fixed weird log formatting due to trailing line breaks --- Common/SysError.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Common/SysError.cpp b/Common/SysError.cpp index c046b8f63b..993e6ca307 100644 --- a/Common/SysError.cpp +++ b/Common/SysError.cpp @@ -52,7 +52,8 @@ std::string GetStringErrorMsg(int errCode) { snprintf(err_str, buff_size, "%s", ConvertWStringToUTF8(err_strw).c_str()); std::string err_string = err_str; - if (!err_string.empty() && err_string.back() == '\n') { + // Trim the trailing line breaks which can mess up the logs + while (!err_string.empty() && (err_string.back() == '\n' || err_string.back() == '\r')) { err_string.pop_back(); } return err_string;