[Scummvm-git-logs] scummvm master -> d629ff44f9a0ddfc042c8f243f47c0f3959f81c6
sev-
noreply at scummvm.org
Tue Sep 26 15:39:28 UTC 2023
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:
d629ff44f9 GRAPHICS: MACGUI: Properly fill in table struct in MacText
Commit: d629ff44f9a0ddfc042c8f243f47c0f3959f81c6
https://github.com/scummvm/scummvm/commit/d629ff44f9a0ddfc042c8f243f47c0f3959f81c6
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-09-26T17:39:13+02:00
Commit Message:
GRAPHICS: MACGUI: Properly fill in table struct in MacText
Changed paths:
graphics/macgui/mactext.cpp
diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index ba9a10a1530..30ce9bca58f 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -575,6 +575,9 @@ void MacText::chopChunk(const Common::U32String &str, int *curLinePtr) {
curChunk = _textLines[curLine].chunks.size() - 1;
chunk = &_textLines[curLine].chunks[curChunk];
} else {
+ if (str.empty())
+ return;
+
curChunk = _textLines[curLine].table->back().cells.back().text.back().chunks.size() - 1;
chunk = &_textLines[curLine].table->back().cells.back().text.back().chunks[curChunk];
}
@@ -898,6 +901,7 @@ void MacText::splitString(const Common::U32String &str, int curLine) {
_inTable = true;
curTextLine->table = new Common::Array<MacTextTableRow>();
+ continue;
} else if (cmd == 'b') { // Body start
} else if (cmd == 'B') { // Body end
_inTable = false;
@@ -905,6 +909,7 @@ void MacText::splitString(const Common::U32String &str, int curLine) {
curTextLine = &_textLines[curLine];
} else if (cmd == 'r') { // Row
curTextLine->table->push_back(MacTextTableRow());
+ continue;
} else if (cmd == 'c') { // Cell start
uint16 flags;
s = readHex(&flags, s, 2);
@@ -915,6 +920,7 @@ void MacText::splitString(const Common::U32String &str, int curLine) {
curTextLine->table->back().cells.back().text.resize(1);
curTextLine = &curTextLine->table->back().cells.back().text[0];
curTextLine->chunks.push_back(_defaultFormatting);
+ continue;
} else if (cmd == 'C') { // Cell end
} else {
error("MacText: Unknown table subcommand (%c)", cmd);
More information about the Scummvm-git-logs
mailing list