mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-05-31 09:21:36 +00:00
- allow temporary strings to be used as self pointer for String's member functions.
Due to how function calls get resolved by the code generator there were some incorrect flags on the self pointer which triggered an assert and caused incorrect code generation. Fortunately this was a mostly contained special case for which a workaround was possible.
This commit is contained in:
parent
d5a15c66ad
commit
08a1cc0e7e
1 changed files with 2 additions and 2 deletions
|
@ -9065,7 +9065,7 @@ ExpEmit FxVMFunctionCall::Emit(VMFunctionBuilder *build)
|
|||
{
|
||||
assert(Self != nullptr);
|
||||
selfemit = Self->Emit(build);
|
||||
assert((selfemit.RegType == REGT_POINTER) || (selfemit.Fixed && selfemit.Target));
|
||||
assert(selfemit.RegType == REGT_POINTER || selfemit.RegType == REGT_STRING || (selfemit.Fixed && selfemit.Target));
|
||||
|
||||
int innerside = FScopeBarrier::SideFromFlags(Function->Variants[0].Flags);
|
||||
|
||||
|
@ -9085,7 +9085,7 @@ ExpEmit FxVMFunctionCall::Emit(VMFunctionBuilder *build)
|
|||
}
|
||||
}
|
||||
|
||||
if (selfemit.Fixed && selfemit.Target)
|
||||
if ((selfemit.Fixed && selfemit.Target) || selfemit.RegType == REGT_STRING)
|
||||
{
|
||||
// Address of a local variable.
|
||||
build->Emit(OP_PARAM, 0, selfemit.RegType | REGT_ADDROF, selfemit.RegNum);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue