mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Merge pull request #21672 from hrydgard/error-linebreaks
Fixed weird log formatting due to trailing line breaks
This commit is contained in:
1 file changed
+2
-1
+2
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user