Skip to content

Commit

Permalink
Fix weird invalid names that are actually anonymous
Browse files Browse the repository at this point in the history
This fixes anonymous data generating with the same name and being
indistinguishable from one another.
  • Loading branch information
RA-Kooi committed Dec 25, 2021
1 parent 3fee81c commit 764c111
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions DwarfOne2C/Parsing/CompilationUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,12 @@ public void SecondPass()
tag.size = sibling.location - tag.location;
}
}

// Fixup weird invalid names
if(tag.name != null && tag.name.StartsWith('@'))
{
tag.name = $"__anon_{tag.ID:X}";
}
}

void Recurse(Tag parent, int depth)
Expand Down

0 comments on commit 764c111

Please sign in to comment.