From 14501b8a94b00b8dfa727670abcea3ab1a0793a5 Mon Sep 17 00:00:00 2001 From: thrust26 Date: Fri, 7 Dec 2018 22:02:16 +0100 Subject: [PATCH] Fixed exception when FatalEmulationError message was too short. --- src/gui/Dialog.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/Dialog.cxx b/src/gui/Dialog.cxx index 93c983549..be7fcd69d 100644 --- a/src/gui/Dialog.cxx +++ b/src/gui/Dialog.cxx @@ -725,6 +725,8 @@ void Dialog::addOKCancelBGroup(WidgetArray& wid, const GUI::Font& font, font.getStringWidth(cancelText))) + BTN_BORDER); int buttonHeight = font.getLineHeight() + 4; + _w = std::max(HBORDER * 2 + buttonWidth * 2 + BUTTON_GAP, _w); + #ifndef BSPF_MAC_OSX addOKWidget(new ButtonWidget(this, font, _w - 2 * buttonWidth - HBORDER - BUTTON_GAP, _h - buttonHeight - VBORDER, buttonWidth, buttonHeight, okText, GuiObject::kOKCmd));