aboutsummaryrefslogtreecommitdiff
path: root/engines/access/files.cpp
diff options
context:
space:
mode:
authorStrangerke2014-08-31 01:11:44 +0200
committerStrangerke2014-08-31 01:11:44 +0200
commit469e3273608d71964da8b1f492e9c66ba9194752 (patch)
treee122c10e6a988605fba9cef847e236f0c7676f4f /engines/access/files.cpp
parent2cc6d9299ae6a7037704dd72eeebc44ab2c3c1b4 (diff)
downloadscummvm-rg350-469e3273608d71964da8b1f492e9c66ba9194752.tar.gz
scummvm-rg350-469e3273608d71964da8b1f492e9c66ba9194752.tar.bz2
scummvm-rg350-469e3273608d71964da8b1f492e9c66ba9194752.zip
ACCESS: Add a safeguard to avoid a potential issue when alternating stream and raw data use
Diffstat (limited to 'engines/access/files.cpp')
-rw-r--r--engines/access/files.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/access/files.cpp b/engines/access/files.cpp
index c449d906cd..d8823c0510 100644
--- a/engines/access/files.cpp
+++ b/engines/access/files.cpp
@@ -62,8 +62,10 @@ Resource::~Resource() {
byte *Resource::data() {
if (_data == nullptr) {
_data = new byte[_size];
+ int pos = _stream->pos();
_stream->seek(0);
_stream->read(_data, _size);
+ _stream->seek(pos);
}
return _data;