-fix assignment to vector types in script using integer indices crash (#978)
This commit is contained in:
parent
8a28af024e
commit
2144648a3d
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
Vector2 *v=reinterpret_cast<Vector2*>(_data._mem);
|
||||||
valid=true;
|
valid=true;
|
||||||
v[idx]=p_value;
|
(*v)[idx]=p_value;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (p_index.get_type()==Variant::STRING) {
|
} 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);
|
Vector3 *v=reinterpret_cast<Vector3*>(_data._mem);
|
||||||
valid=true;
|
valid=true;
|
||||||
v[idx]=p_value;
|
(*v)[idx]=p_value;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (p_index.get_type()==Variant::STRING) {
|
} else if (p_index.get_type()==Variant::STRING) {
|
||||||
|
|
Loading…
Reference in a new issue