diff --git a/sources/ClangSharp.PInvokeGenerator/PInvokeGenerator.cs b/sources/ClangSharp.PInvokeGenerator/PInvokeGenerator.cs index d63cb941..8dc69f1f 100644 --- a/sources/ClangSharp.PInvokeGenerator/PInvokeGenerator.cs +++ b/sources/ClangSharp.PInvokeGenerator/PInvokeGenerator.cs @@ -1592,8 +1592,8 @@ private string GetTypeNameForPointeeType(Cursor cursor, Cursor context, Type poi } else { - name = GetTypeName(cursor, context, pointeeType, out nativePointeeTypeName); - name = GetRemappedName(name, cursor, tryRemapOperatorName: false); + // Otherwise fields that point at anonymous structs get the wrong name + name = GetRemappedTypeName(cursor, context, pointeeType, out nativePointeeTypeName); name += '*'; }