From b3a23b2efb7df0c3ff0e38bbf6030148f3e4360c Mon Sep 17 00:00:00 2001 From: Tomasz Chabora Date: Thu, 24 Sep 2020 13:23:06 +0200 Subject: [PATCH] Remove unnecessary empty line from Dictionaries (cherry picked from commit 7b1ad6fbe019da0e59bec9ceb9b68c0b5b766833) --- core/variant_parser.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/variant_parser.cpp b/core/variant_parser.cpp index 1aa8298aff7..80e845ad6e8 100644 --- a/core/variant_parser.cpp +++ b/core/variant_parser.cpp @@ -1750,11 +1750,14 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str write(E->get(), p_store_string_func, p_store_string_ud, p_encode_res_func, p_encode_res_ud); p_store_string_func(p_store_string_ud, ": "); write(dict[E->get()], p_store_string_func, p_store_string_ud, p_encode_res_func, p_encode_res_ud); - if (E->next()) + if (E->next()) { p_store_string_func(p_store_string_ud, ",\n"); + } else { + p_store_string_func(p_store_string_ud, "\n"); + } } - p_store_string_func(p_store_string_ud, "\n}"); + p_store_string_func(p_store_string_ud, "}"); } break; case Variant::ARRAY: {