AD: Fix seeking for tail md5
This commit is contained in:
parent
3146b2ffae
commit
841254e6f1
2 changed files with 2 additions and 2 deletions
|
@ -114,7 +114,7 @@ String MacResManager::computeResForkMD5AsString(uint32 length, bool tail) const
|
||||||
|
|
||||||
SeekableSubReadStream resForkStream(_stream, dataOffset, dataOffset + dataLength);
|
SeekableSubReadStream resForkStream(_stream, dataOffset, dataOffset + dataLength);
|
||||||
if (tail && dataLength > length)
|
if (tail && dataLength > length)
|
||||||
resForkStream.seek(length, SEEK_END);
|
resForkStream.seek(-length, SEEK_END);
|
||||||
|
|
||||||
return computeStreamMD5AsString(resForkStream, MIN<uint32>(length, _resForkSize));
|
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 (game.flags & ADGF_TAILMD5) {
|
||||||
if (testFile.size() > md5Bytes)
|
if (testFile.size() > md5Bytes)
|
||||||
testFile.seek(md5Bytes, SEEK_END);
|
testFile.seek(-md5Bytes, SEEK_END);
|
||||||
}
|
}
|
||||||
|
|
||||||
fileProps.size = testFile.size();
|
fileProps.size = testFile.size();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue