From b7b23dce5f65ab40d74108e8a39472f16b68dbb3 Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Wed, 21 Aug 2024 08:48:35 -0500 Subject: [PATCH] Fix bug with usedMax not only setting zero after max. --- Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs b/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs index b0f4ab48f..a972f1b78 100644 --- a/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs +++ b/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs @@ -2062,6 +2062,9 @@ namespace Flax.Build.Bindings contents.Append(indent).Append(entryInfo.Name); if (!string.IsNullOrEmpty(entryInfo.Value)) { + if (usedMax) + usedMax = false; + string value; if (enumInfo.UnderlyingType != null) { @@ -2075,6 +2078,7 @@ namespace Flax.Build.Bindings } contents.Append(" = ").Append(value); } + // Handle case of next value after Max value being zero if a value is not defined. else if (string.IsNullOrEmpty(entryInfo.Value) && usedMax) { contents.Append(" = ").Append('0');