diff --git a/src/mapleall/mpl2mpl/src/constantfold.cpp b/src/mapleall/mpl2mpl/src/constantfold.cpp index 555ebfe42088b8a735dd74bc6ffee31cd3e4af77..b08fb3a304b9ff4496204041da0f2c4bf80ea0bd 100644 --- a/src/mapleall/mpl2mpl/src/constantfold.cpp +++ b/src/mapleall/mpl2mpl/src/constantfold.cpp @@ -1743,7 +1743,7 @@ std::pair ConstantFold::FoldBinary(BinaryNode *node) { result = l; } else if (op == OP_mul && lp.second != 0 && lp.second > -kMaxOffset) { // (X + konst) * rConst -> the pair [(X*rConst), (konst*rConst)] - sum = lp.second * cst; + sum = static_cast(lp.second) * static_cast(cst); if (GetPrimTypeSize(primType) > GetPrimTypeSize(lp.first->GetPrimType())) { lp.first = mirModule->CurFuncCodeMemPool()->New(OP_cvt, primType, PTY_i32, lp.first); }