From 929b416fdbf542e30cf13d0e7ef9610ff4f188fa Mon Sep 17 00:00:00 2001 From: Tomasz Chabora Date: Thu, 9 Aug 2018 21:44:41 +0200 Subject: [PATCH] Add some curly braces to make dictionary printing less ambiguous --- core/variant.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/variant.cpp b/core/variant.cpp index e4be5520bc5..19f91e2e840 100644 --- a/core/variant.cpp +++ b/core/variant.cpp @@ -1460,7 +1460,7 @@ Variant::operator String() const { const Dictionary &d = *reinterpret_cast(_data._mem); //const String *K=NULL; - String str; + String str("{"); List keys; d.get_key_list(&keys); @@ -1479,8 +1479,9 @@ Variant::operator String() const { for (int i = 0; i < pairs.size(); i++) { if (i > 0) str += ", "; - str += "(" + pairs[i].key + ":" + pairs[i].value + ")"; + str += pairs[i].key + ":" + pairs[i].value; } + str += "}"; return str; } break;