Skip to content

Commit c5a6a76

Browse files
Merge pull request #572 from dpaoliello/escann
Escape strings in `annotate` attributes
2 parents 4d07e05 + 0ab0f87 commit c5a6a76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sources/ClangSharp.PInvokeGenerator/PInvokeGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6817,7 +6817,7 @@ private void WithAttributes(NamedDecl namedDecl, bool onlySupportedOSPlatform =
68176817

68186818
case CX_AttrKind_Annotate:
68196819
{
6820-
var annotationText = attr.Spelling;
6820+
var annotationText = EscapeString(attr.Spelling);
68216821
outputBuilder.WriteCustomAttribute($"""NativeAnnotation("{annotationText}")""");
68226822
break;
68236823
}

0 commit comments

Comments
 (0)