From b141e57598a34e0b3481a378ff1d7c1256f14dbe Mon Sep 17 00:00:00 2001 From: Katy Coe Date: Mon, 18 Nov 2019 06:06:42 +0100 Subject: [PATCH] Output: Annotate float values with 'f' suffix (CS0664) --- Il2CppInspector/Reflection/Extensions.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Il2CppInspector/Reflection/Extensions.cs b/Il2CppInspector/Reflection/Extensions.cs index f6d8879..96f2248 100644 --- a/Il2CppInspector/Reflection/Extensions.cs +++ b/Il2CppInspector/Reflection/Extensions.cs @@ -66,6 +66,8 @@ namespace Il2CppInspector.Reflection public static string ToCSharpValue(this object value) { if (value is bool) return (bool) value ? "true" : "false"; + if (value is float) + return value + "f"; if (value is string str) { // Replace standard escape characters var s = new StringBuilder();