Fix #7434: Incorrect use of vector iterator. (#7437)

pull/82/head
PeterN 5 years ago committed by GitHub
parent acb09eb9a8
commit 9244dad3f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -636,9 +636,8 @@ public:
uint y = r.top;
auto iter = this->content.begin() + this->vscroll->GetPosition();
auto end = iter + this->vscroll->GetCapacity();
if (end > this->content.end())
end = this->content.end();
size_t last = this->vscroll->GetPosition() + this->vscroll->GetCapacity();
auto end = (last < this->content.size()) ? this->content.begin() + last : this->content.end();
for (/**/; iter != end; iter++) {
const ContentInfo *ci = *iter;

Loading…
Cancel
Save