diff --git a/core/variant.cpp b/core/variant.cpp index 9fa51ec7c91..b0e97900a29 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;