diff options
author | Eugene Sandulenko | 2017-08-07 11:59:57 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2017-08-07 12:18:20 +0200 |
commit | d51a87a83bf187b1865d66d2e603217d0f05be79 (patch) | |
tree | 58c8f40c348676ae2ac77374fe1460400ef55a8a /graphics/macgui | |
parent | abf6abdb65dce0e583c8ac870c86d366313a5ab8 (diff) | |
download | scummvm-rg350-d51a87a83bf187b1865d66d2e603217d0f05be79.tar.gz scummvm-rg350-d51a87a83bf187b1865d66d2e603217d0f05be79.tar.bz2 scummvm-rg350-d51a87a83bf187b1865d66d2e603217d0f05be79.zip |
GRAPHICS: MACGUI: Correctly expand selection beyond last line
Diffstat (limited to 'graphics/macgui')
-rw-r--r-- | graphics/macgui/mactext.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp index d7c3795070..9db5d459d7 100644 --- a/graphics/macgui/mactext.cpp +++ b/graphics/macgui/mactext.cpp @@ -448,6 +448,10 @@ void MacText::removeLastLine() { } void MacText::getRowCol(int x, int y, int *sx, int *sy, int *row, int *col) { + if (y > _textMaxHeight) { + x = _surface->w; + } + y = CLIP(y, 0, _textMaxHeight); // FIXME: We should use bsearch() here @@ -456,9 +460,6 @@ void MacText::getRowCol(int x, int y, int *sx, int *sy, int *row, int *col) { while (*row && _textLines[*row].y > y) (*row)--; - if (y > _textMaxHeight) - x = _surface->w; - *sy = _textLines[*row].y; *col = 0; |