Skip to content

Commit 5d7ed45

Browse files
committed
[[ Script ]] Fix signature of builtin throw handler.
1 parent 4a17182 commit 5d7ed45

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

libscript/src/script-object.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,12 @@ bool MCScriptInitialize(void)
165165

166166
////
167167

168-
uindex_t t_bool_type_def, t_uint_type_def, t_double_type_def;
168+
uindex_t t_bool_type_def, t_uint_type_def, t_double_type_def, t_string_type_def, t_null_type_def;
169169
MCScriptAddDefinedTypeToModule(t_builder, t_bool_type_index, t_bool_type_def);
170170
MCScriptAddDefinedTypeToModule(t_builder, t_uint_type_index, t_uint_type_def);
171171
MCScriptAddDefinedTypeToModule(t_builder, t_double_type_index, t_double_type_def);
172+
MCScriptAddDefinedTypeToModule(t_builder, t_null_type_index, t_null_type_def);
173+
MCScriptAddDefinedTypeToModule(t_builder, t_string_type_index, t_string_type_def);
172174

173175
MCScriptAddDefinitionToModule(t_builder, t_def_index);
174176
MCScriptBeginHandlerTypeInModule(t_builder, t_bool_type_def);
@@ -210,8 +212,8 @@ bool MCScriptInitialize(void)
210212
MCScriptAddExportToModule(t_builder, t_def_index);
211213

212214
MCScriptAddDefinitionToModule(t_builder, t_def_index);
213-
MCScriptBeginHandlerTypeInModule(t_builder, t_null_type_index);
214-
MCScriptContinueHandlerTypeInModule(t_builder, kMCScriptHandlerTypeParameterModeIn, MCNAME("reason"), t_string_type_index);
215+
MCScriptBeginHandlerTypeInModule(t_builder, t_null_type_def);
216+
MCScriptContinueHandlerTypeInModule(t_builder, kMCScriptHandlerTypeParameterModeIn, MCNAME("reason"), t_string_type_def);
215217
MCScriptEndHandlerTypeInModule(t_builder, t_type_index);
216218
MCScriptAddForeignHandlerToModule(t_builder, MCNAME("Throw"), t_type_index, MCSTR("MCScriptBuiltinThrow"), t_def_index);
217219
MCScriptAddExportToModule(t_builder, t_def_index);

0 commit comments

Comments
 (0)