diff --git a/Il2CppInspector.Common/Cpp/CppField.cs b/Il2CppInspector.Common/Cpp/CppField.cs index d4dcd85..f550f5f 100644 --- a/Il2CppInspector.Common/Cpp/CppField.cs +++ b/Il2CppInspector.Common/Cpp/CppField.cs @@ -81,6 +81,8 @@ namespace Il2CppInspector.Cpp public CppEnumField(string name, CppType type, object value) : base(name, type) => Value = value; - public override string ToString(string format = "") => Name + " = " + Value; + // We output as hex to avoid unsigned value compiler errors for top bit set values in VS <= 2017 + // We'll get compiler warnings instead but it will still compile + public override string ToString(string format = "") => $"{Name} = 0x{Value:x8}"; } }