From feeae230760a3d8797d59b13077f4201b8b1e137 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Sun, 13 Oct 2019 14:48:28 +0200 Subject: [PATCH] Prevent infinit recursion in UiOkDialog --- Source/scrollrt.cpp | 1 - SourceX/DiabloUI/dialogs.cpp | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/scrollrt.cpp b/Source/scrollrt.cpp index 8c43b39a2..746ae9274 100644 --- a/Source/scrollrt.cpp +++ b/Source/scrollrt.cpp @@ -2299,7 +2299,6 @@ static void DrawMain(int dwHgt, BOOL draw_desc, BOOL draw_hp, BOOL draw_mana, BO return; } - /// ASSERT: assert(ysize >= 0 && ysize <= 480); // SCREEN_HEIGHT if (ysize > 0) { diff --git a/SourceX/DiabloUI/dialogs.cpp b/SourceX/DiabloUI/dialogs.cpp index 3cf298277..a5b67620c 100644 --- a/SourceX/DiabloUI/dialogs.cpp +++ b/SourceX/DiabloUI/dialogs.cpp @@ -305,9 +305,11 @@ void UiOkDialog(const char *text, const char *caption, bool error, UiItem *rende return; } + gbActive = false; Init(text, caption, error); DialogLoop(dialogItems, dialogItemsSize, render_behind, render_behind_size); Deinit(); + gbActive = true; } void UiErrorOkDialog(const char *text, const char *caption, UiItem *render_behind, std::size_t render_behind_size)