From 29c22a422faef75d20b1ea313ddd08cf647fa7d9 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Mon, 18 Sep 2023 20:14:43 -0400 Subject: [PATCH] Fixed a JSON parser issue causing event data to be parsed wrong! --- source/funkin/data/DataParse.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/funkin/data/DataParse.hx b/source/funkin/data/DataParse.hx index 8a78e7c97..f6b5dd659 100644 --- a/source/funkin/data/DataParse.hx +++ b/source/funkin/data/DataParse.hx @@ -64,7 +64,7 @@ class DataParse return switch (json.value) { case JString(s): s; - case JNumber(n): n; + case JNumber(n): Std.parseInt(n); case JBool(b): b; case JNull: null; case JObject(fields): jsonFieldsToDynamicObject(fields); @@ -82,7 +82,7 @@ class DataParse var result:Dynamic = {}; for (field in fields) { - Reflect.setField(result, field.name, field.value); + Reflect.setField(result, field.name, jsonToDynamic(field.value)); } return result; }