mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 15:41:15 +00:00
(svn r17399) -Fix (r17365): if scrollbar has more capacity than elements clicking on the "scroll down" button asserted (esminis)
This commit is contained in:
parent
5fd5ae125a
commit
d81a3ba2da
@ -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)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user