From 56c794863621e416e0805451152052628ca4682a Mon Sep 17 00:00:00 2001 From: anod <182859762@qq.com> Date: Wed, 8 Mar 2023 15:35:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E4=BF=AE=E5=A4=8D32m?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/arm11/cheat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/arm11/cheat.c b/source/arm11/cheat.c index 6504c94..fc94959 100644 --- a/source/arm11/cheat.c +++ b/source/arm11/cheat.c @@ -316,12 +316,13 @@ static CodeLocation rom_fit_newsize( CodeLocation rom, int realend, int totalsiz // get the biggest space that all bytes is 0 CodeLocation found=NULL, current=NULL; int szfound=0, szcurrent=0; + int reallen = realend / sizeof(instruction_t); for( int i=0; i < realend; ++i ) { if( rom[i] == 0 ) { if( szcurrent == 0 ) current = rom+i; - szcurrent++; + szcurrent += sizeof(instruction_t); } else if( szcurrent > 0 ) {