diff options
-rw-r--r-- | src/window_gui.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/window_gui.h b/src/window_gui.h index 4a4750b43..80819a9d3 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))); } /** |