mirror of https://github.com/OpenTTD/OpenTTD
parent
acb09eb9a8
commit
9244dad3f1
|
@ -636,9 +636,8 @@ public:
|
||||||
uint y = r.top;
|
uint y = r.top;
|
||||||
|
|
||||||
auto iter = this->content.begin() + this->vscroll->GetPosition();
|
auto iter = this->content.begin() + this->vscroll->GetPosition();
|
||||||
auto end = iter + this->vscroll->GetCapacity();
|
size_t last = this->vscroll->GetPosition() + this->vscroll->GetCapacity();
|
||||||
if (end > this->content.end())
|
auto end = (last < this->content.size()) ? this->content.begin() + last : this->content.end();
|
||||||
end = this->content.end();
|
|
||||||
|
|
||||||
for (/**/; iter != end; iter++) {
|
for (/**/; iter != end; iter++) {
|
||||||
const ContentInfo *ci = *iter;
|
const ContentInfo *ci = *iter;
|
||||||
|
|
Loading…
Reference in New Issue