Skip to content

Commit

Permalink
Fix enums generating with comma on the last element
Browse files Browse the repository at this point in the history
  • Loading branch information
RA-Kooi committed Dec 24, 2021
1 parent 11ba35e commit f9d6184
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions DwarfOne2C/CWriter/CWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ private static List<string> GenerateEnum(
{
code.Add(tabs + "\t" + element);
}
string last = code[code.Count - 1];
code[code.Count - 1] = last.Remove(last.Length - 1);

code.Add(tabs + "};");
code.Add("");
Expand Down

0 comments on commit f9d6184

Please sign in to comment.