mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-25 13:31:37 +00:00
- fixed: flag CVars in ZScript referenced wrong addresses
This commit is contained in:
parent
85f5f897d7
commit
4a1f36623b
1 changed files with 4 additions and 4 deletions
|
@ -6858,10 +6858,10 @@ ExpEmit FxCVar::Emit(VMFunctionBuilder *build)
|
|||
{
|
||||
int *pVal;
|
||||
auto cv = static_cast<FFlagCVar *>(CVar);
|
||||
auto &vcv = cv->ValueVar;
|
||||
if (vcv == compatflags) pVal = &i_compatflags;
|
||||
else if (vcv == compatflags2) pVal = &ii_compatflags2;
|
||||
else pVal = &vcv.Value;
|
||||
auto vcv = &cv->ValueVar;
|
||||
if (vcv == &compatflags) pVal = &i_compatflags;
|
||||
else if (vcv == &compatflags2) pVal = &ii_compatflags2;
|
||||
else pVal = &vcv->Value;
|
||||
build->Emit(OP_LKP, addr.RegNum, build->GetConstantAddress(pVal));
|
||||
build->Emit(OP_LW, dest.RegNum, addr.RegNum, nul);
|
||||
build->Emit(OP_SRL_RI, dest.RegNum, dest.RegNum, cv->BitNum);
|
||||
|
|
Loading…
Reference in a new issue