Skip to content

Commit

Permalink
Fixed|Scripting: Passing records by reference in arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Nov 23, 2019
1 parent 0b62389 commit 02b4d8e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions doomsday/sdk/libcore/src/scriptsys/process.cpp
Expand Up @@ -387,9 +387,7 @@ void Process::call(Function const &function, ArrayValue const &arguments, Value
for (; b != argValues.end() && a != function.arguments().end(); ++b, ++a)
{
// Records must only be passed as unowned references.
DENG2_ASSERT(!is<RecordValue>(*b) || !(*b)->as<RecordValue>().hasOwnership());

context().names().add(new Variable(*a, (*b)->duplicate()));
context().names().add(new Variable(*a, (*b)->duplicateAsReference()));
}

// This should never be called if the process is suspended.
Expand Down

0 comments on commit 02b4d8e

Please sign in to comment.