OS X: fix out-of-bounds TW.META access.

For some reason OS X can post pointer events far outside the window
rect, so be defensive here.
pull/66/head
whitequark 2016-10-10 12:25:10 +00:00
parent 4537444db5
commit f5a37ae2fd
1 changed files with 1 additions and 1 deletions

View File

@ -1023,7 +1023,7 @@ void TextWindow::MouseEvent(bool leftClick, bool leftDown, double x, double y) {
break;
}
}
if(r >= rows) {
if(r >= rows || c >= MAX_COLS) {
SetMousePointerToHand(false);
goto done;
}