diff --git a/core/variant.cpp b/core/variant.cpp index 81d10f379ad..31321dc0f39 100644 --- a/core/variant.cpp +++ b/core/variant.cpp @@ -1559,72 +1559,78 @@ Variant::operator String() const { case VECTOR2_ARRAY: { DVector vec = operator DVector(); - String str; + String str("["); for(int i=0;i0) str+=", "; str=str+Variant( vec[i] ); } + str += "]"; return str; } break; case VECTOR3_ARRAY: { DVector vec = operator DVector(); - String str; + String str("["); for(int i=0;i0) str+=", "; str=str+Variant( vec[i] ); } + str += "]"; return str; } break; case STRING_ARRAY: { DVector vec = operator DVector(); - String str; + String str("["); for(int i=0;i0) str+=", "; str=str+vec[i]; } + str += "]"; return str; } break; case INT_ARRAY: { DVector vec = operator DVector(); - String str; + String str("["); for(int i=0;i0) str+=", "; str=str+itos(vec[i]); } + str += "]"; return str; } break; case REAL_ARRAY: { DVector vec = operator DVector(); - String str; + String str("["); for(int i=0;i0) str+=", "; str=str+rtos(vec[i]); } + str += "]"; return str; } break; case ARRAY: { Array arr = operator Array(); - String str; + String str("["); for (int i=0; i