From b06391f3d4253a2124987544906e4d33e9d20961 Mon Sep 17 00:00:00 2001 From: RocketRobz Date: Mon, 22 Jan 2024 03:43:48 -0700 Subject: [PATCH] Bug fix --- retail/cardenginei/arm9/source/cardDma.thumb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/retail/cardenginei/arm9/source/cardDma.thumb.c b/retail/cardenginei/arm9/source/cardDma.thumb.c index 6659b1124..11e1ecf34 100644 --- a/retail/cardenginei/arm9/source/cardDma.thumb.c +++ b/retail/cardenginei/arm9/source/cardDma.thumb.c @@ -658,11 +658,11 @@ u32 cardReadDma(u32 dma0, u8* dst0, u32 src0, u32 len0) { && dma <= 3 //&& func != NULL && len > 0 - && !(((int)dst) & 3) + && !(((u32)dst) & ((ce9->valueBits & isSdk5) ? 31 : 3)) && isNotTcm((u32)dst, len) // check 512 bytes page alignement - && !(((int)len) & 511) - && !(((int)src) & 511) + && !(len & 511) + && !(src & 511) ) { isDma = true; if (ce9->patches->cardEndReadDmaRef || ce9->thumbPatches->cardEndReadDmaRef) {