[Scummvm-git-logs] scummvm master -> 75491291f9c8cb737dba273cd2ff2abe1ee74bb2

sev- sev at scummvm.org
Sat Aug 5 08:13:34 CEST 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
75491291f9 GRAPHICS: MACGUI: Made CLIP statemements more useful


Commit: 75491291f9c8cb737dba273cd2ff2abe1ee74bb2
    https://github.com/scummvm/scummvm/commit/75491291f9c8cb737dba273cd2ff2abe1ee74bb2
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-08-05T08:12:43+02:00

Commit Message:
GRAPHICS: MACGUI: Made CLIP statemements more useful

Changed paths:
    graphics/macgui/mactext.cpp


diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index 23442d0..551dead 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) {





More information about the Scummvm-git-logs mailing list