mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-29 04:01:27 +01:00
Fix mmapping of subregions
This commit is contained in:
1 parent
20fc6a489e
commit
a9d36dda6c
1 file changed
+1
-1
@@ -63,7 +63,7 @@ namespace FEXCore::Memory {
|
||||
for (auto const &Region : MappedRegions) {
|
||||
if (Region.contains(Offset)) {
|
||||
LogMan::Throw::A((Region.Offset + Region.Size) >= (Offset + Size), "Pointer in region but region isn't large enough. Needs 0x%lx more", Offset - Region.Offset + Size - Region.Size);
|
||||
if ((Region.Offset + Region.Size) < (Offset + Size)) {
|
||||
if ((Region.Offset + Region.Size) >= (Offset + Size)) {
|
||||
return reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(Region.Ptr) + (Offset - Region.Offset));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user