From 051181fa6ee00d8379e8a7dc7442b58342d4352b Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sat, 9 Jul 2022 22:32:08 +0200 Subject: Enforce limits of settings that could cause buggy behaviour (#12450) Enforces the setting value bounds that are currently only limited by the GUI (settingtypes.txt). --- src/gui/guiTable.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/guiTable.cpp') diff --git a/src/gui/guiTable.cpp b/src/gui/guiTable.cpp index 79ae1aea3..3929d678b 100644 --- a/src/gui/guiTable.cpp +++ b/src/gui/guiTable.cpp @@ -84,7 +84,7 @@ GUITable::GUITable(gui::IGUIEnvironment *env, #endif core::rect relative_rect = m_scrollbar->getRelativePosition(); s32 width = (relative_rect.getWidth() / (2.0 / 3.0)) * density * - g_settings->getFloat("gui_scaling"); + g_settings->getFloat("gui_scaling", 0.5f, 20.0f); m_scrollbar->setRelativePosition(core::rect( relative_rect.LowerRightCorner.X-width,relative_rect.UpperLeftCorner.Y, relative_rect.LowerRightCorner.X,relative_rect.LowerRightCorner.Y -- cgit v1.2.3