Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
GLK: Fix negative index crash when clicking in a window
  • Loading branch information
Torbjörn Andersson committed Jan 4, 2019
1 parent f023f28 commit 7394afb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engines/glk/window_pair.cpp
Expand Up @@ -245,7 +245,7 @@ void PairWindow::setArrangement(uint method, uint size, Window *keyWin) {
}

void PairWindow::click(const Point &newPos) {
for (int ctr = 0, idx = (!_backward ? (int)_children.size() - 1 : 0); ctr < (int)_children.size();
for (int ctr = 0, idx = (_backward ? (int)_children.size() - 1 : 0); ctr < (int)_children.size();
++ctr, idx += (_backward ? -1 : 1)) {
Window *w = _children[idx];
if (w->_bbox.contains(newPos))
Expand Down

0 comments on commit 7394afb

Please sign in to comment.