ggpo: wrong elan ram offset calculation

This commit is contained in:
Flyinghead 2022-01-30 11:30:23 +01:00
parent d551848a9b
commit e51a291195
1 changed files with 1 additions and 1 deletions

View File

@ -157,7 +157,7 @@ u32 ElanRamWatcher::getMemOffset(void *p)
addr &= 0x1fffffff;
if (addr < 0x0a000000 || addr >= 0x0a000000 + ELAN_RAM_SIZE)
return -1;
addr &= ~(ELAN_RAM_SIZE - 1);
addr &= ELAN_RAM_SIZE - 1;
} else {
if ((u8 *)p < RAM || (u8 *)p >= &RAM[ELAN_RAM_SIZE])
return -1;