aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graphics/macgui/mactext.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index 23442d05f4..551dead1c5 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -446,7 +446,7 @@ void MacText::removeLastLine() {
}
void MacText::getRowCol(int x, int y, int *sx, int *sy, int *row, int *col) {
- CLIP(y, 0, _textMaxHeight);
+ y = CLIP(y, 0, _textMaxHeight);
// FIXME: We should use bsearch() here
*row = _textLines.size() - 1;
@@ -498,8 +498,8 @@ void MacText::getRowCol(int x, int y, int *sx, int *sy, int *row, int *col) {
Common::String MacText::getTextChunk(int startRow, int startCol, int endRow, int endCol, bool formatted) {
Common::String res;
- CLIP(startRow, 0, (int)_textLines.size() - 1);
- CLIP(endRow, 0, (int)_textLines.size() - 1);
+ startRow = CLIP(startRow, 0, (int)_textLines.size() - 1);
+ endRow = CLIP(endRow, 0, (int)_textLines.size() - 1);
for (int i = startRow; i <= endRow; i++) {
if (i == startRow && i == endRow) {