Skip to content

Commit c04fdc4

Browse files
authored
fix for issue #117 (#118)
fix for issue #117
2 parents 4241566 + 9ccc72e commit c04fdc4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Assets/FullSerializer/Source/Internal/fsTypeExtensions.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ public static string CSharpName(this Type type, bool includeNamespace) {
7070
name += type.Name;
7171
}
7272
else {
73-
name += type.Name.Substring(0, type.Name.IndexOf('`'));
73+
var genericsTic = type.Name.IndexOf('`');
74+
if (genericsTic > 0) {
75+
name += type.Name.Substring(0, genericsTic);
76+
}
7477
name += "<" + String.Join(",", genericArguments.Select(t => CSharpName(t, includeNamespace)).ToArray()) + ">";
7578
}
7679

@@ -81,4 +84,4 @@ public static string CSharpName(this Type type, bool includeNamespace) {
8184
return name;
8285
}
8386
}
84-
}
87+
}

0 commit comments

Comments
 (0)