From e1d6dac87a6f7cc5f55a8eea33ce6110561597e1 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 78e4308..b698f48 100644 --- a/src/textwin.cpp +++ b/src/textwin.cpp @@ -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; }