[Scummvm-git-logs] scummvm master -> a6cfbb787e61f7a7fed1a225bd3683f8e84fa9ca

sev- sev at scummvm.org
Wed Jun 17 22:00:49 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:
a6cfbb787e GRAPHICS: MACGUI: Fix crash when deleting last character in MacText


Commit: a6cfbb787e61f7a7fed1a225bd3683f8e84fa9ca
    https://github.com/scummvm/scummvm/commit/a6cfbb787e61f7a7fed1a225bd3683f8e84fa9ca
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-06-18T00:00:20+02:00

Commit Message:
GRAPHICS: MACGUI: Fix crash when deleting last character in MacText

Changed paths:
    graphics/macgui/mactext.cpp


diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index 9c65ec42a1..c4d2365ee8 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();
+		pos = chunks[i].text.size() - 1;
 	}
 
 	*col = pos;




More information about the Scummvm-git-logs mailing list