aboutsummaryrefslogtreecommitdiff
path: root/graphics/macgui
diff options
context:
space:
mode:
authorEugene Sandulenko2017-08-03 19:25:39 +0200
committerEugene Sandulenko2017-08-04 21:54:20 +0200
commit71aadb5645a8d19ec015b372f5331dbb6440a719 (patch)
tree1273b8b717b0bd0e97a789514bdc16ab3e46e6e4 /graphics/macgui
parent0be9566a5a82826199cbb283d3373680c7ead019 (diff)
downloadscummvm-rg350-71aadb5645a8d19ec015b372f5331dbb6440a719.tar.gz
scummvm-rg350-71aadb5645a8d19ec015b372f5331dbb6440a719.tar.bz2
scummvm-rg350-71aadb5645a8d19ec015b372f5331dbb6440a719.zip
GRAPHICS: MACGUI: Correctly calculate row in MacText::getRowCol()
Diffstat (limited to 'graphics/macgui')
-rw-r--r--graphics/macgui/mactext.cpp3
1 files changed, 3 insertions, 0 deletions
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;