-fix assignment to vector types in script using integer indices crash (#978)

This commit is contained in:
Juan Linietsky 2015-01-02 15:53:02 -03:00
parent 8a28af024e
commit 2144648a3d
1 changed files with 2 additions and 2 deletions

View File

@ -961,7 +961,7 @@ void Variant::set(const Variant& p_index, const Variant& p_value, bool *r_valid)
Vector2 *v=reinterpret_cast<Vector2*>(_data._mem);
valid=true;
v[idx]=p_value;
(*v)[idx]=p_value;
return;
}
} else if (p_index.get_type()==Variant::STRING) {
@ -1055,7 +1055,7 @@ void Variant::set(const Variant& p_index, const Variant& p_value, bool *r_valid)
Vector3 *v=reinterpret_cast<Vector3*>(_data._mem);
valid=true;
v[idx]=p_value;
(*v)[idx]=p_value;
return;
}
} else if (p_index.get_type()==Variant::STRING) {