Fix signed unsigned char compare to promote to int

This commit is contained in:
drmortalwombat 2025-05-19 15:31:30 +02:00
parent 8f37df448f
commit 79ec9af3f2
2 changed files with 3 additions and 1 deletions

View File

@ -23581,7 +23581,7 @@ void InterCodeProcedure::Close(void)
{ {
GrowingTypeArray tstack(IT_NONE); GrowingTypeArray tstack(IT_NONE);
CheckFunc = !strcmp(mIdent->mString, "check_mulli"); CheckFunc = !strcmp(mIdent->mString, "main");
CheckCase = false; CheckCase = false;
mEntryBlock = mBlocks[0]; mEntryBlock = mBlocks[0];

View File

@ -3586,6 +3586,8 @@ InterCodeGenerator::ExValue InterCodeGenerator::TranslateExpression(Declaration*
else else
dtype = TheSignedIntTypeDeclaration; dtype = TheSignedIntTypeDeclaration;
} }
else if (vl.mType->mSize == 1 && vr.mType->mSize == 1 && ((vr.mType->mFlags & DTF_SIGNED) || (vl.mType->mFlags & DTF_SIGNED)))
dtype = TheSignedIntTypeDeclaration;
else else
{ {
if (vl.mType->mSize == 4 || vr.mType->mSize == 4) if (vl.mType->mSize == 4 || vr.mType->mSize == 4)