tweak waterbox hash detection
A game could wild pointer into a slightly out of range part of the sealed heap during init, and then do so differently on a subsequent init, and we wouldn't detect it
This commit is contained in:
parent
4ec0753f52
commit
1000b74f2d
|
@ -73,7 +73,7 @@ namespace BizHawk.Emulation.Cores.Waterbox
|
||||||
if (!Sealed)
|
if (!Sealed)
|
||||||
{
|
{
|
||||||
Memory.Protect(Memory.Start, Used, MemoryBlock.Protection.R);
|
Memory.Protect(Memory.Start, Used, MemoryBlock.Protection.R);
|
||||||
_hash = WaterboxUtils.Hash(Memory.GetStream(Memory.Start, Used, false));
|
_hash = WaterboxUtils.Hash(Memory.GetStream(Memory.Start, WaterboxUtils.AlignUp(Used), false));
|
||||||
Sealed = true;
|
Sealed = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue