[Scummvm-git-logs] scummvm branch-2-9 -> 09a6fa53887024b8bfcb7b4918eed257591c2138
mduggan
noreply at scummvm.org
Sat Nov 30 05:02:14 UTC 2024
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:
09a6fa5388 DGDS: Only search for title before CR
Commit: 09a6fa53887024b8bfcb7b4918eed257591c2138
https://github.com/scummvm/scummvm/commit/09a6fa53887024b8bfcb7b4918eed257591c2138
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2024-11-30T16:02:06+11:00
Commit Message:
DGDS: Only search for title before CR
Colons are allowed to appear in the dialog string if they appear after a CR.
This fixes #15535.
Changed paths:
engines/dgds/dialog.cpp
diff --git a/engines/dgds/dialog.cpp b/engines/dgds/dialog.cpp
index ee140fb056b..6feca965c4e 100644
--- a/engines/dgds/dialog.cpp
+++ b/engines/dgds/dialog.cpp
@@ -179,7 +179,8 @@ void Dialog::drawType2(Graphics::ManagedSurface *dst, DialogDrawStage stage) {
Common::String title;
Common::String txt;
uint32 colonpos = _str.find(':');
- if (colonpos != Common::String::npos) {
+ uint32 crpos = _str.find('\r');
+ if (colonpos != Common::String::npos && (crpos == Common::String::npos || crpos > colonpos)) {
title = _str.substr(0, colonpos);
txt = _str.substr(colonpos + 1);
// Most have a CR after the colon? trim it to remove a blank line.
More information about the Scummvm-git-logs
mailing list