From 2b027d8a9492e9c7fad0141becd6acf573507113 Mon Sep 17 00:00:00 2001 From: Charles Crete Date: Thu, 14 Feb 2019 23:59:18 -0500 Subject: [PATCH] Fix JSON maplist (#347) * Fix maplist * Fix more LogMessages * Fix LogMessage --- scripting/get5/jsonhelpers.sp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripting/get5/jsonhelpers.sp b/scripting/get5/jsonhelpers.sp index 411a60eb8..f038d613b 100644 --- a/scripting/get5/jsonhelpers.sp +++ b/scripting/get5/jsonhelpers.sp @@ -75,7 +75,7 @@ stock float json_object_get_float_safe(JSON_Object json, const char[] key, float // Used for parsing an Array[String] to a sourcepawn ArrayList of strings stock int AddJsonSubsectionArrayToList(JSON_Object json, const char[] key, ArrayList list, int maxValueLength) { - if (json_has_key(json, key, Type_Object)) { + if (!json_has_key(json, key, Type_Object)) { return 0; } @@ -91,7 +91,6 @@ stock int AddJsonSubsectionArrayToList(JSON_Object json, const char[] key, Array count++; } array.Cleanup(); - delete array; } return count; }