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.
This commit is contained in:
whitequark 2016-10-10 12:25:10 +00:00
parent 4c022f8d79
commit e1d6dac87a

View File

@ -988,7 +988,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;
}