- fixed: FxAssign used the wrong value type for emitting the store operation.

It used the expression's value type, but needs to use the variable's, which can be different when the assignment is synthesized from a builtin function.
This commit is contained in:
Christoph Oelckers 2017-03-19 21:36:18 +01:00
parent 403c5693a9
commit 0721aef218
2 changed files with 1 additions and 3 deletions

View file

@ -2563,7 +2563,7 @@ ExpEmit FxAssign::Emit(VMFunctionBuilder *build)
if (IsBitWrite == -1)
{
build->Emit(ValueType->GetStoreOp(), pointer.RegNum, result.RegNum, build->GetConstantInt(0));
build->Emit(Base->ValueType->GetStoreOp(), pointer.RegNum, result.RegNum, build->GetConstantInt(0));
}
else
{

View file

@ -570,8 +570,6 @@ size_t VMFunctionBuilder::Emit(int opcode, int opa, int opb, int opc)
assert(opb >= 0);
assert(opc >= 0);
assert(opcode != OP_NOP);
// The following were just asserts, meaning this would silently create broken code if there was an overflow
// if this happened in a release build. Not good.
// These are critical errors that need to be reported to the user.