diff --git a/sago/platform_folders.cpp b/sago/platform_folders.cpp index 1531e91..f4a1cd1 100644 --- a/sago/platform_folders.cpp +++ b/sago/platform_folders.cpp @@ -103,8 +103,7 @@ std::string win32_utf16_to_utf8(const wchar_t* wstr) { } if (actualSize == 0) { // WideCharToMultiByte return 0 for errors. - const std::string errorMsg = "UTF16 to UTF8 failed with error code: " + GetLastError(); - throw std::runtime_error(errorMsg.c_str()); + throw std::runtime_error("UTF16 to UTF8 failed with error code: " + std::to_string(GetLastError())); } return res; }