尝试修复32m的问题

This commit is contained in:
anod 2023-03-08 15:35:23 +08:00
parent 60f462be79
commit 56c7948636

View File

@ -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 )
{