Skip to content
Permalink
Browse files

Merge branch 'master' of https://github.com/coelckers/gzdoom

  • Loading branch information...
coelckers committed Mar 13, 2019
2 parents 561444f + 7165b40 commit 04bf97579667bdcf15843d45cb485dfc51455d88
Showing with 13 additions and 2 deletions.
  1. +13 −2 src/scripting/backend/codegen.cpp
@@ -7425,10 +7425,21 @@ ExpEmit FxArrayElement::Emit(VMFunctionBuilder *build)
build->Emit(OP_LP, start.RegNum, arrayvar.RegNum, build->GetConstantInt(0));

auto f = Create<PField>(NAME_None, TypeUInt32, ismeta? VARF_Meta : 0, SizeAddr);
static_cast<FxMemberBase *>(Array)->membervar = f;
static_cast<FxMemberBase *>(Array)->AddressRequested = false;
auto arraymemberbase = static_cast<FxMemberBase *>(Array);

auto origmembervar = arraymemberbase->membervar;
auto origaddrreq = arraymemberbase->AddressRequested;
auto origvaluetype = Array->ValueType;

arraymemberbase->membervar = f;
arraymemberbase->AddressRequested = false;
Array->ValueType = TypeUInt32;

bound = Array->Emit(build);

arraymemberbase->membervar = origmembervar;
arraymemberbase->AddressRequested = origaddrreq;
Array->ValueType = origvaluetype;
}
else start = arrayvar;

0 comments on commit 04bf975

Please sign in to comment.
You can’t perform that action at this time.