diff --git a/core/variant.cpp b/core/variant.cpp index caa9b998de2..0d97032f434 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