mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-16 09:11:21 +00:00
Fix let ignoring const-ness
This commit is contained in:
parent
7a1342188a
commit
949cd5b746
1 changed files with 8 additions and 1 deletions
|
@ -12564,7 +12564,14 @@ FxExpression *FxLocalVariableDeclaration::Resolve(FCompileContext &ctx)
|
|||
{
|
||||
if (Init->IsStruct())
|
||||
{
|
||||
ValueType = NewPointer(ValueType);
|
||||
bool writable = true;
|
||||
|
||||
if(ctx.Version >= MakeVersion(4, 12, 0))
|
||||
{
|
||||
Init->RequestAddress(ctx, &writable);
|
||||
}
|
||||
|
||||
ValueType = NewPointer(ValueType, !writable);
|
||||
Init = new FxTypeCast(Init, ValueType, false);
|
||||
SAFE_RESOLVE(Init, ctx);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue