mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-21 01:05:59 +00:00
AD: Properly seek to the tail of file for md5 computation
This commit is contained in:
parent
bd3e2f8e6b
commit
63870b65fa
@ -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(-(int64)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(-(int64)md5Bytes, SEEK_END);
|
||||
}
|
||||
|
||||
fileProps.size = testFile.size();
|
||||
|
Loading…
x
Reference in New Issue
Block a user