BepInEx / Il2CppInterop

A tool interoperate between CoreCLR and Il2Cpp at runtime
GNU Lesser General Public License v3.0
185 stars 59 forks source link

Rewired: non-valid Unicode characters in generic parameter name #130

Open laymain opened 2 months ago

laymain commented 2 months ago

Hi,

Il2CppInterop happens to generate non valid method/type names with some unicode characters.

In my case, it occurs with the Rewired library, it produces the following type name: Il2CppRewired_Core.dll Has an Invalid Type Name String "MethodInfoStoreGeneric_nqXVGKvgfzozBIAcnvWAyMFzaDld_Internal_Static_Int32_IList_1_☺_Predicate_1_☺_Int32_0`1" which contains two SOH (U+0001) characters.

See https://github.com/LavaGang/MelonLoader/issues/659

laymain commented 2 months ago

Here is the method prototype that causes the issue: internal static int nqXVGKvgfzozBIAcnvWAyMFzaDld<\u0001>(IList<\u0001> P_0, Predicate<\u0001> P_1, int P_2) where \u0001 : Element

It could be that the generic type arguments are not protected against invalid characters