From 71aadb5645a8d19ec015b372f5331dbb6440a719 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 3 Aug 2017 19:25:39 +0200 Subject: GRAPHICS: MACGUI: Correctly calculate row in MacText::getRowCol() --- graphics/macgui/mactext.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'graphics/macgui') diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp index 45e5249bc7..b3942f0d38 100644 --- a/graphics/macgui/mactext.cpp +++ b/graphics/macgui/mactext.cpp @@ -454,6 +454,9 @@ void MacText::getRowCol(int x, int y, int *sx, int *sy, int *row, int *col) { while (*row < _textLines.size() - 1 && _textLines[*row].y < y) (*row)++; + if (*row) + (*row)--; + *sy = _textLines[*row].y; *col = 0; -- cgit v1.2.3