Skip to content

Commit

Permalink
.NET: Fix weird case with invalid field names
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed May 13, 2024
1 parent 96a8ea4 commit 92a4923
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions csharp-api/AssemblyGenerator/ClassGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,12 @@ private TypeDeclarationSyntax GenerateFields(List<SimpleBaseTypeSyntax> baseType
continue;
}

// Make sure field name only contains ASCII characters
if (field.Name.Any(c => c > 127)) {
System.Console.WriteLine("Skipping field with non-ASCII characters: " + field.Name + " " + field.Index);
continue;
}

// We don't want any of the properties to be "void" properties
if (!REFrameworkNET.AssemblyGenerator.validTypes.Contains(field.Type.FullName)) {
continue;
Expand Down

0 comments on commit 92a4923

Please sign in to comment.