mirror of
https://github.com/AssetRipper/AssetRipper.git
synced 2025-12-11 20:15:29 +01:00
Be more strict about alignment
This commit is contained in:
parent
f9ba652b09
commit
0125475c0a
@ -122,7 +122,7 @@ namespace AssetRipper.IO.Files.BundleFiles.FileStream
|
||||
{
|
||||
// Note: metadataSize might not be a multiple of 4
|
||||
}
|
||||
else if ((metadataPosition % 4 == 0) && (metadataSize % 4 == 0) && (metadataBytesRead + 3 >= metadataSize))
|
||||
else if ((metadataPosition % 4 == 0) && (metadataSize % 4 == 0) && (((metadataBytesRead + 3) & ~3) == metadataSize))
|
||||
{
|
||||
// The stream needed to be aligned to 4 bytes.
|
||||
// https://github.com/AssetRipper/AssetRipper/issues/1470
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user