1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 20:12:21 +02:00

Fix to switch fix

This commit is contained in:
Brian Fiete 2020-12-19 11:01:10 -08:00
parent 49c2a69a45
commit a3ea79cd62

View file

@ -4464,7 +4464,7 @@ void BfModule::Visit(BfSwitchStatement* switchStmt)
} }
} }
if (caseValue.mType == switchValue.mType) if ((caseValue.mType == switchValue.mType) || (eqResult))
{ {
constantInt = mBfIRBuilder->GetConstant(caseValue.mValue); constantInt = mBfIRBuilder->GetConstant(caseValue.mValue);
if ((constantInt != NULL) && (!mBfIRBuilder->IsInt(constantInt->mTypeCode))) if ((constantInt != NULL) && (!mBfIRBuilder->IsInt(constantInt->mTypeCode)))