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 4537444db5
commit f5a37ae2fd

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;
}