diff --git a/Source/Engine/Scripting/ManagedCLR/MAssembly.Mono.cpp b/Source/Engine/Scripting/ManagedCLR/MAssembly.Mono.cpp index 3e3ad5ed8..d2f07ef80 100644 --- a/Source/Engine/Scripting/ManagedCLR/MAssembly.Mono.cpp +++ b/Source/Engine/Scripting/ManagedCLR/MAssembly.Mono.cpp @@ -159,10 +159,16 @@ MClass* MAssembly::GetClass(const StringAnsiView& fullname) const return nullptr; } + StringAnsiView key(fullname); + + // Special case for reference + if (fullname[fullname.Length() - 1] == '&') + key = StringAnsiView(key.Get(), key.Length() - 1); + // Find class by name const auto& classes = GetClasses(); MClass* result = nullptr; - classes.TryGet(fullname, result); + classes.TryGet(key, result); #if 0 if (!result) {