From f5a37ae2fddddcae58c53b3c99fadabaacf16812 Mon Sep 17 00:00:00 2001 From: whitequark Date: Mon, 10 Oct 2016 12:25:10 +0000 Subject: [PATCH] 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. --- src/textwin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/textwin.cpp b/src/textwin.cpp index 2bdcf6e8..ffab4742 100644 --- a/src/textwin.cpp +++ b/src/textwin.cpp @@ -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; }