From c7fcaf4dd159cdcbf07d7aa82bdf4bce7558816c Mon Sep 17 00:00:00 2001 From: qndel Date: Wed, 3 Aug 2022 20:40:48 +0200 Subject: [PATCH] fix error messages --- Source/DiabloUI/dialogs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/DiabloUI/dialogs.cpp b/Source/DiabloUI/dialogs.cpp index 9d086501f..2aaf31bcb 100644 --- a/Source/DiabloUI/dialogs.cpp +++ b/Source/DiabloUI/dialogs.cpp @@ -158,7 +158,7 @@ void UiOkDialog(string_view caption, string_view text, bool error, const std::ve if (SDL_ShowCursor(SDL_ENABLE) <= -1) LogError("{}", SDL_GetError()); std::string captionStr = std::string(caption); - std::string textStr = std::string(caption); + std::string textStr = std::string(text); if (SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, captionStr.c_str(), textStr.c_str(), nullptr) <= -1) { LogError("{}", SDL_GetError()); } @@ -174,7 +174,7 @@ void UiOkDialog(string_view caption, string_view text, bool error, const std::ve if (!Init(caption, text, error, !renderBehind.empty())) { LogError("{}\n{}", caption, text); std::string captionStr = std::string(caption); - std::string textStr = std::string(caption); + std::string textStr = std::string(text); if (SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, captionStr.c_str(), textStr.c_str(), nullptr) <= -1) { LogError("{}", SDL_GetError()); }