Skip to content

Commit e8798b2

Browse files
committed
[[ Script ]] Correct search for existing foreign type definitions in module.
1 parent 9298e54 commit e8798b2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

libscript/src/script-builder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ void MCScriptAddDefinedTypeToModule(MCScriptModuleBuilderRef self, uindex_t p_in
421421
void MCScriptAddForeignTypeToModule(MCScriptModuleBuilderRef self, MCStringRef p_binding, uindex_t& r_type)
422422
{
423423
for(uindex_t i = 0; i < self -> module . type_count; i++)
424-
if (self -> module . types[i] -> kind == kMCScriptTypeKindDefined)
424+
if (self -> module . types[i] -> kind == kMCScriptTypeKindForeign)
425425
if (MCStringIsEqualTo(static_cast<MCScriptForeignType *>(self -> module . types[i]) -> binding, p_binding, kMCStringOptionCompareExact))
426426
{
427427
r_type = i;

0 commit comments

Comments
 (0)