Skip to content

Commit 7b74eb1

Browse files
committed
Merge pull request #105205 from aaronp64/dictionary_has_validated_key
Use validated key in `Dictionary::has`
2 parents 80350c5 + 117b1c3 commit 7b74eb1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/variant/dictionary.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ bool Dictionary::is_empty() const {
218218
bool Dictionary::has(const Variant &p_key) const {
219219
Variant key = p_key;
220220
ERR_FAIL_COND_V(!_p->typed_key.validate(key, "use 'has'"), false);
221-
return _p->variant_map.has(p_key);
221+
return _p->variant_map.has(key);
222222
}
223223

224224
bool Dictionary::has_all(const Array &p_keys) const {

0 commit comments

Comments
 (0)