- ZScript used the wrong variable for compatflags2.

ii_* is merely the storage for info from the compatibility.txt lump.
This commit is contained in:
Christoph Oelckers 2018-06-09 17:59:21 +02:00
parent 4a1f36623b
commit ae1fe041ee

View file

@ -6860,7 +6860,7 @@ ExpEmit FxCVar::Emit(VMFunctionBuilder *build)
auto cv = static_cast<FFlagCVar *>(CVar); auto cv = static_cast<FFlagCVar *>(CVar);
auto vcv = &cv->ValueVar; auto vcv = &cv->ValueVar;
if (vcv == &compatflags) pVal = &i_compatflags; if (vcv == &compatflags) pVal = &i_compatflags;
else if (vcv == &compatflags2) pVal = &ii_compatflags2; else if (vcv == &compatflags2) pVal = &i_compatflags2;
else pVal = &vcv->Value; else pVal = &vcv->Value;
build->Emit(OP_LKP, addr.RegNum, build->GetConstantAddress(pVal)); build->Emit(OP_LKP, addr.RegNum, build->GetConstantAddress(pVal));
build->Emit(OP_LW, dest.RegNum, addr.RegNum, nul); build->Emit(OP_LW, dest.RegNum, addr.RegNum, nul);