From 82e0fc7f60972c2ea93608a453dd081955751dc7 Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Thu, 11 Oct 2018 21:15:00 +0200 Subject: [PATCH] Don't crash on invalid ram write size. Report and ignore --- core/hw/sh4/sh4_mem.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/hw/sh4/sh4_mem.cpp b/core/hw/sh4/sh4_mem.cpp index f49d41f86..d6f8ae34b 100644 --- a/core/hw/sh4/sh4_mem.cpp +++ b/core/hw/sh4/sh4_mem.cpp @@ -257,7 +257,11 @@ void WriteMemBlock_nommu_dma(u32 dst,u32 src,u32 size) void WriteMemBlock_nommu_ptr(u32 dst,u32* src,u32 size) { u32 dst_msk; - verify(size % 4 == 0); + if (size % 4 != 0) + { + printf("WriteMem32_nommu: invalid size %d. Ignored\n", size); + return; + } void* dst_ptr=_vmem_get_ptr2(dst,dst_msk);