diff --git a/src/CodeGenerator/Program.cs b/src/CodeGenerator/Program.cs index 74db283..3f6dad8 100644 --- a/src/CodeGenerator/Program.cs +++ b/src/CodeGenerator/Program.cs @@ -794,9 +794,13 @@ namespace CodeGenerator if (tr.IsEnum) { if (defaultVal.StartsWith("-")) + { correctedDefault = $"({tr.Type})({defaultVal})"; + } else + { correctedDefault = $"({tr.Type}){defaultVal}"; + } return true; }