Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 090d5e0

Browse files
committed
[[ Script ]] Fix throwing of 'property used before assigned' error
This patch ensures that the key / value list passed to MCErrorCreateAndThrow in the PropertyUsedBeforeAssigned throw function is nullptr terminated.
1 parent d977991 commit 090d5e0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libscript/src/script-error.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ MCScriptThrowPropertyUsedBeforeAssignedError(MCScriptInstanceRef p_instance,
5252
p_instance->module->name,
5353
"property",
5454
MCScriptGetNameOfDefinitionInModule(p_instance->module,
55-
p_property_def));
55+
p_property_def),
56+
nil);
5657
}
5758

5859
bool

0 commit comments

Comments
 (0)