aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2013-01-22 04:23:11 +0200
committerFilippos Karapetis2013-01-22 04:23:11 +0200
commit93763acd328df7a25a77136769086329761c8023 (patch)
treeece46e0620b7c8cb4e8fcfc9fcd2ce24232f4d31
parent63660cd019eaa5d45a4f58b4f3865c43a9e58988 (diff)
downloadscummvm-rg350-93763acd328df7a25a77136769086329761c8023.tar.gz
scummvm-rg350-93763acd328df7a25a77136769086329761c8023.tar.bz2
scummvm-rg350-93763acd328df7a25a77136769086329761c8023.zip
TOLTECS: Don't change the archive position when loading a resource (bug #3601567)
-rw-r--r--engines/toltecs/resource.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/toltecs/resource.cpp b/engines/toltecs/resource.cpp
index 437b4a963a..d66075004b 100644
--- a/engines/toltecs/resource.cpp
+++ b/engines/toltecs/resource.cpp
@@ -107,11 +107,13 @@ Resource *ResourceCache::load(uint resIndex) {
} else {
debug(1, "ResourceCache::load(%d) From disk", resIndex);
+ int32 curPos = _vm->_arc->pos();
Resource *resItem = new Resource();
resItem->size = _vm->_arc->openResource(resIndex);
resItem->data = new byte[resItem->size];
_vm->_arc->read(resItem->data, resItem->size);
_vm->_arc->closeResource();
+ _vm->_arc->seek(curPos);
_cache[resIndex] = resItem;