Skip to content

Commit

Permalink
Fixed natmem_offset references
Browse files Browse the repository at this point in the history
  • Loading branch information
midwan committed Jan 13, 2025
1 parent e7fc9ec commit 22ef9b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/osdep/sigsegv_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ static int handle_exception(mcontext_t sigcont, long fault_addr)
}

// Get Amiga address of illegal memory address
long amiga_addr = long(fault_addr) - long(natmem_offset);
long amiga_addr = long(fault_addr) - long(regs.natmem_offset);

// Check for stupid RAM detection of kickstart
if (a3000lmem_bank.allocated_size > 0 && amiga_addr >= a3000lmem_bank.start - 0x00100000 && amiga_addr < a3000lmem_bank.start - 0x00100000 + 8) {
Expand Down Expand Up @@ -607,7 +607,7 @@ static int handle_exception(unsigned long* pregs, long fault_addr)
}

// Get Amiga address of illegal memory address
auto amiga_addr = (long)fault_addr - (long)natmem_offset;
auto amiga_addr = (long)fault_addr - (long)regs.natmem_offset;

// Check for stupid RAM detection of kickstart
if (a3000lmem_bank.allocated_size > 0 && amiga_addr >= a3000lmem_bank.start - 0x00100000 && amiga_addr < a3000lmem_bank.start - 0x00100000 + 8) {
Expand Down

0 comments on commit 22ef9b5

Please sign in to comment.