mirror of
https://github.com/godotengine/godot.git
synced 2025-02-17 16:20:53 +00:00
Merge pull request #96864 from KoBeWi/dictionerrory
Fix `Dictionary.merge()` type validation
This commit is contained in:
commit
60ffa9645a
@ -261,7 +261,7 @@ void Dictionary::merge(const Dictionary &p_dictionary, bool p_overwrite) {
|
|||||||
Variant key = E.key;
|
Variant key = E.key;
|
||||||
Variant value = E.value;
|
Variant value = E.value;
|
||||||
ERR_FAIL_COND(!_p->typed_key.validate(key, "merge"));
|
ERR_FAIL_COND(!_p->typed_key.validate(key, "merge"));
|
||||||
ERR_FAIL_COND(!_p->typed_key.validate(value, "merge"));
|
ERR_FAIL_COND(!_p->typed_value.validate(value, "merge"));
|
||||||
if (p_overwrite || !has(key)) {
|
if (p_overwrite || !has(key)) {
|
||||||
operator[](key) = value;
|
operator[](key) = value;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user