From 714e2755ae756772cf60a0f0c8497a3c6aa68fa2 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sat, 16 Mar 2019 20:21:05 +0200 Subject: [PATCH] Non-JIT memory allocation fix, cleanup. --- memory.cpp | 3 +++ newcpu.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/memory.cpp b/memory.cpp index 5314a2bd..4edd41f8 100644 --- a/memory.cpp +++ b/memory.cpp @@ -1855,8 +1855,11 @@ static void set_direct_memory(addrbank *ab) bool mapped_malloc (addrbank *ab) { ab->startmask = ab->start; + ab->startaccessmask = ab->start & ab->mask; ab->baseaddr = xcalloc (uae_u8, ab->reserved_size + 4); ab->allocated_size = ab->baseaddr != NULL ? ab->reserved_size : 0; + ab->baseaddr_direct_r = NULL; + ab->baseaddr_direct_w = NULL; ab->flags &= ~ABFLAG_MAPPED; set_direct_memory(ab); return ab->baseaddr != NULL; diff --git a/newcpu.cpp b/newcpu.cpp index 8cfc5ba2..4e1fa914 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -7726,7 +7726,7 @@ static uaecptr disasm_mmu030(uaecptr pc, uae_u16 opcode, uae_u16 extra, struct i int rw = (extra >> 9) & 1; int fd = (extra >> 8) & 1; int unused = (extra & 0xff); - TCHAR *r = NULL; + const TCHAR *r = NULL; if (mmu_op30_invea(opcode)) break; -- 2.47.3