From d81a3ba2da1f0677228c295c2ad1a3da386bdda0 Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 3 Sep 2009 09:07:14 +0000 Subject: [PATCH] (svn r17399) -Fix (r17365): if scrollbar has more capacity than elements clicking on the "scroll down" button asserted (esminis) --- src/window_gui.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/window_gui.h b/src/window_gui.h index 4a4750b43f..80819a9d32 100644 --- a/src/window_gui.h +++ b/src/window_gui.h @@ -287,7 +287,7 @@ public: void UpdatePosition(int difference) { if (difference == 0) return; - this->SetPosition(Clamp(this->pos + difference, 0, this->count - this->cap)); + this->SetPosition(Clamp(this->pos + difference, 0, max(this->count - this->cap, 0))); } /**