diff --git a/src/Generator/Generators/CSharp/CSharpMarshal.cs b/src/Generator/Generators/CSharp/CSharpMarshal.cs index b228c0d5..3fce5e19 100644 --- a/src/Generator/Generators/CSharp/CSharpMarshal.cs +++ b/src/Generator/Generators/CSharp/CSharpMarshal.cs @@ -344,9 +344,9 @@ namespace CppSharp.Generators.CSharp var pointee = pointer.Pointee; Type type = pointee.Desugar(); - if ((type.IsPrimitiveType(PrimitiveType.Char) || - type.IsPrimitiveType(PrimitiveType.WideChar)) && - pointer.QualifiedPointee.Qualifiers.IsConst) + if ((type.IsPrimitiveType(PrimitiveType.Char) || + type.IsPrimitiveType(PrimitiveType.WideChar)) && + pointer.QualifiedPointee.Qualifiers.IsConst) { Context.Return.Write("Marshal.StringToHGlobalAnsi({0})", Helpers.SafeIdentifier(Context.Parameter.Name));