From 6fb23f7099eb7d3fc2ee95f56bfbf0c7982a3c65 Mon Sep 17 00:00:00 2001 From: David Hackbarth Date: Mon, 9 Nov 2026 15:49:51 +0100 Subject: [PATCH] Fix ShowMessage --- GDP/D3D9/Utilities.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/GDP/D3D9/Utilities.cpp b/GDP/D3D9/Utilities.cpp index d879387..daf4047 100644 --- a/GDP/D3D9/Utilities.cpp +++ b/GDP/D3D9/Utilities.cpp @@ -5,9 +5,11 @@ void ShowError(UINT error) #if _DEBUG LPCTSTR msg = TEXT("Application quit with an error: "); #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 - msg = (std::string(msg) + std::to_string(error)).c_str(); + std::string str = std::string(msg) + std::to_string(error); + msg = str.c_str(); #endif // UNICODE MessageBox(nullptr, msg, TEXT("Error"), MB_OK); #endif // DEBUG