forked from mirror/OpenTTD
(svn r17399) -Fix (r17365): if scrollbar has more capacity than elements clicking on the "scroll down" button asserted (esminis)
This commit is contained in:
@@ -287,7 +287,7 @@ public:
|
|||||||
void UpdatePosition(int difference)
|
void UpdatePosition(int difference)
|
||||||
{
|
{
|
||||||
if (difference == 0) return;
|
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)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user