mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-01 00:21:43 +00:00
Fixed nested dynamic array indexing causing a compilation error.
This commit is contained in:
parent
43ca814da8
commit
7165b40657
1 changed files with 13 additions and 2 deletions
|
@ -7425,10 +7425,21 @@ ExpEmit FxArrayElement::Emit(VMFunctionBuilder *build)
|
||||||
build->Emit(OP_LP, start.RegNum, arrayvar.RegNum, build->GetConstantInt(0));
|
build->Emit(OP_LP, start.RegNum, arrayvar.RegNum, build->GetConstantInt(0));
|
||||||
|
|
||||||
auto f = Create<PField>(NAME_None, TypeUInt32, ismeta? VARF_Meta : 0, SizeAddr);
|
auto f = Create<PField>(NAME_None, TypeUInt32, ismeta? VARF_Meta : 0, SizeAddr);
|
||||||
static_cast<FxMemberBase *>(Array)->membervar = f;
|
auto arraymemberbase = static_cast<FxMemberBase *>(Array);
|
||||||
static_cast<FxMemberBase *>(Array)->AddressRequested = false;
|
|
||||||
|
auto origmembervar = arraymemberbase->membervar;
|
||||||
|
auto origaddrreq = arraymemberbase->AddressRequested;
|
||||||
|
auto origvaluetype = Array->ValueType;
|
||||||
|
|
||||||
|
arraymemberbase->membervar = f;
|
||||||
|
arraymemberbase->AddressRequested = false;
|
||||||
Array->ValueType = TypeUInt32;
|
Array->ValueType = TypeUInt32;
|
||||||
|
|
||||||
bound = Array->Emit(build);
|
bound = Array->Emit(build);
|
||||||
|
|
||||||
|
arraymemberbase->membervar = origmembervar;
|
||||||
|
arraymemberbase->AddressRequested = origaddrreq;
|
||||||
|
Array->ValueType = origvaluetype;
|
||||||
}
|
}
|
||||||
else start = arrayvar;
|
else start = arrayvar;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue