aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/graphics/view.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/engines/sci/graphics/view.cpp b/engines/sci/graphics/view.cpp
index 014ddb1281..5924571660 100644
--- a/engines/sci/graphics/view.cpp
+++ b/engines/sci/graphics/view.cpp
@@ -286,10 +286,15 @@ void GfxView::initData(GuiResourceId resourceId) {
seekEntry = loopData[0];
if (seekEntry != 255) {
- if (seekEntry >= loopCount)
- error("Bad loop-pointer in sci 1.1 view");
_loop[loopNo].mirrorFlag = true;
- loopData = _resource->subspan(headerSize + (seekEntry * loopSize));
+
+ // use the root loop for mirroring. this handles rare loops that
+ // mirror loops that mirror loops. (FPFP view 844, bug #10953)
+ do {
+ if (seekEntry >= loopCount)
+ error("Bad loop-pointer in sci 1.1 view");
+ loopData = _resource->subspan(headerSize + (seekEntry * loopSize));
+ } while ((seekEntry = loopData[0]) != 255);
} else {
_loop[loopNo].mirrorFlag = false;
}