From 090d5e0a24bd310cfd69cce0ec58f989a7761135 Mon Sep 17 00:00:00 2001 From: Mark Waddingham Date: Thu, 21 Sep 2017 12:12:33 +0100 Subject: [PATCH] [[ 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. --- libscript/src/script-error.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libscript/src/script-error.cpp b/libscript/src/script-error.cpp index c62c9cbfc91..a89d51720a6 100644 --- a/libscript/src/script-error.cpp +++ b/libscript/src/script-error.cpp @@ -52,7 +52,8 @@ MCScriptThrowPropertyUsedBeforeAssignedError(MCScriptInstanceRef p_instance, p_instance->module->name, "property", MCScriptGetNameOfDefinitionInModule(p_instance->module, - p_property_def)); + p_property_def), + nil); } bool