From 088420459ff859a4a132ee9ed1f67821e5627793 Mon Sep 17 00:00:00 2001 From: def Date: Mon, 4 Jan 2021 19:16:38 +0100 Subject: [PATCH] Fix scrollbar going out of bounce (fixes #3416) --- src/game/client/components/menus_demo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/client/components/menus_demo.cpp b/src/game/client/components/menus_demo.cpp index c363cb4d9..1e4ef3ab9 100644 --- a/src/game/client/components/menus_demo.cpp +++ b/src/game/client/components/menus_demo.cpp @@ -570,7 +570,7 @@ void CMenus::UiDoListboxStart(const void *pID, const CUIRect *pRect, float RowHe } Scroll.HMargin(5.0f, &Scroll); - gs_ListBoxScrollValue = clamp(DoScrollbarV(pID, &Scroll, gs_ListBoxScrollValue), 0.0f, 1.0f); + gs_ListBoxScrollValue = clamp(DoScrollbarV(pID, &Scroll, clamp(gs_ListBoxScrollValue, 0.0f, 1.0f)), 0.0f, 1.0f); // the list gs_ListBoxView = gs_ListBoxOriginalView;