aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorEugene Sandulenko2017-08-05 08:12:43 +0200
committerEugene Sandulenko2017-08-05 08:12:43 +0200
commit75491291f9c8cb737dba273cd2ff2abe1ee74bb2 (patch)
treefbd58326f52d55d6b47149ab037a412327efdb3c /graphics
parent81a236ee8fa6c3e148b7d115517a0e9ef35b0e28 (diff)
downloadscummvm-rg350-75491291f9c8cb737dba273cd2ff2abe1ee74bb2.tar.gz
scummvm-rg350-75491291f9c8cb737dba273cd2ff2abe1ee74bb2.tar.bz2
scummvm-rg350-75491291f9c8cb737dba273cd2ff2abe1ee74bb2.zip
GRAPHICS: MACGUI: Made CLIP statemements more useful
Diffstat (limited to 'graphics')
-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) {