Fix ShowMessage

This commit is contained in:
2026-11-09 12:16:26 +01:00
parent 24dbe2dd58
commit 0d55e6be6d
+4 -2
View File
@@ -5,9 +5,11 @@ void ShowError(UINT error)
#if _DEBUG #if _DEBUG
LPCTSTR msg = TEXT("Application quit with an error: "); LPCTSTR msg = TEXT("Application quit with an error: ");
#if UNICODE #if UNICODE
msg = (std::wstring(msg) + std::to_wstring(error)).c_str(); std::wstring str = std::wstring(msg) + std::to_wstring(error);
msg = str.c_str();
#else // UNICODE #else // UNICODE
msg = (std::string(msg) + std::to_string(error)).c_str(); std::string str = std::wstring(msg) + std::to_wstring(error);
msg = str.c_str();
#endif // UNICODE #endif // UNICODE
MessageBox(nullptr, msg, TEXT("Error"), MB_OK); MessageBox(nullptr, msg, TEXT("Error"), MB_OK);
#endif // DEBUG #endif // DEBUG