Log: Add spacer between error and fmt if necessary

This commit is contained in:
Megamouse 2022-04-24 14:17:00 +02:00
parent c175cdf3d8
commit 1d40c06c19
1 changed files with 5 additions and 0 deletions

View File

@ -2003,6 +2003,11 @@ s32 error_code::error_report(s32 result, const char* fmt, const fmt_type_info* s
// Format log message (use preallocated buffer)
g_tls_error_str.clear();
fmt::append(g_tls_error_str, "'%s' failed with 0x%08x", func, result);
// Add spacer between error and fmt if necessary
if (fmt[0] != ' ')
g_tls_error_str += " : ";
fmt::raw_append(g_tls_error_str, fmt, sup, args);
// Update stats and check log threshold