[Scummvm-git-logs] scummvm master -> 38337e12b9eba5b8aacbaad53ce45dc5af761ce6

sev- sev at scummvm.org
Fri Jun 19 12:05:02 UTC 2020


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:
38337e12b9 GRAPHICS: MACGUI: Properly process deleting character at end of the line


Commit: 38337e12b9eba5b8aacbaad53ce45dc5af761ce6
    https://github.com/scummvm/scummvm/commit/38337e12b9eba5b8aacbaad53ce45dc5af761ce6
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-06-19T14:04:28+02:00

Commit Message:
GRAPHICS: MACGUI: Properly process deleting character at end of the line

Changed paths:
    graphics/macgui/mactext.cpp


diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index 2d72389bf2..4b6a6d96d2 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -85,7 +85,7 @@ uint MacTextLine::getChunkNum(int *col) {
 
 	if (i == chunks.size()) {
 		i--;	// touch the last chunk
-		pos = chunks[i].text.size() - 1;
+		pos = chunks[i].text.size();
 	}
 
 	*col = pos;
@@ -1494,6 +1494,9 @@ void MacText::deletePreviousChar(int *row, int *col) {
 		int pos = *col - 1;
 		uint ch = _textLines[*row].getChunkNum(&pos);
 
+		if (pos == _textLines[*row].chunks[ch].text.size())
+			pos--;
+
 		_textLines[*row].chunks[ch].text.deleteChar(pos);
 
 		(*col)--;




More information about the Scummvm-git-logs mailing list