From 35b0546737f3dfa7f08bd3202a054648da0f35ae Mon Sep 17 00:00:00 2001 From: Capostrophic <21265616+Capostrophic@users.noreply.github.com> Date: Sat, 23 Jun 2018 14:21:21 +0300 Subject: [PATCH 1/2] Consider
tag when discarding post-EOL tag text
(regression #4473)
---
apps/openmw/mwgui/formatting.cpp | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/apps/openmw/mwgui/formatting.cpp b/apps/openmw/mwgui/formatting.cpp
index 16568e2f34..edcb94eed9 100644
--- a/apps/openmw/mwgui/formatting.cpp
+++ b/apps/openmw/mwgui/formatting.cpp
@@ -31,13 +31,16 @@ namespace MWGui
boost::algorithm::replace_all(mText, "\r", "");
- // vanilla game does not show any text after last
tag.
+ // vanilla game does not show any text after the last EOL tag.
const std::string lowerText = Misc::StringUtils::lowerCase(mText);
- int index = lowerText.rfind("
");
- if (index == -1)
+ int brIndex = lowerText.rfind("
");
+ int pIndex = lowerText.rfind("
");
+ if (brIndex == pIndex)
mText = "";
+ else if (brIndex > pIndex)
+ mText = mText.substr(0, brIndex+4);
else
- mText = mText.substr(0, index+4);
+ mText = mText.substr(0, pIndex+3);
registerTag("br", Event_BrTag);
registerTag("p", Event_PTag);
From afbe8f21616531f9664b9963f18f2c2735bde919 Mon Sep 17 00:00:00 2001
From: Capostrophic <21265616+Capostrophic@users.noreply.github.com>
Date: Sat, 23 Jun 2018 14:29:15 +0300
Subject: [PATCH 2/2] Update changelog
---
CHANGELOG.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 782a817e82..aef35f5a29 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,7 +22,7 @@
Bug #4036: Weird behaviour of AI packages if package target has non-unique ID
Bug #4047: OpenMW not reporting its version number in MacOS; OpenMW-CS not doing it fully
Bug #4125: OpenMW logo cropped on bugtracker
- Bug #4215: OpenMW shows book text after last
tag
+ Bug #4215: OpenMW shows book text after last EOL tag
Bug #4221: Characters get stuck in V-shaped terrain
Bug #4251: Stationary NPCs do not return to their position after combat
Bug #4286: Scripted animations can be interrupted