mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-15 00:27:31 +00:00
AD: Fix seeking for tail md5
This commit is contained in:
parent
3146b2ffae
commit
841254e6f1
@ -114,7 +114,7 @@ String MacResManager::computeResForkMD5AsString(uint32 length, bool tail) const
|
||||
|
||||
SeekableSubReadStream resForkStream(_stream, dataOffset, dataOffset + dataLength);
|
||||
if (tail && dataLength > length)
|
||||
resForkStream.seek(length, SEEK_END);
|
||||
resForkStream.seek(-length, SEEK_END);
|
||||
|
||||
return computeStreamMD5AsString(resForkStream, MIN<uint32>(length, _resForkSize));
|
||||
}
|
||||
|
@ -549,7 +549,7 @@ static bool getFilePropertiesIntern(uint md5Bytes, const AdvancedMetaEngine::Fil
|
||||
|
||||
if (game.flags & ADGF_TAILMD5) {
|
||||
if (testFile.size() > md5Bytes)
|
||||
testFile.seek(md5Bytes, SEEK_END);
|
||||
testFile.seek(-md5Bytes, SEEK_END);
|
||||
}
|
||||
|
||||
fileProps.size = testFile.size();
|
||||
|
Loading…
x
Reference in New Issue
Block a user