summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2023-11-26 17:35:27 +0100
committerA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2023-11-26 17:35:27 +0100
commitca5ec6aec1b77b5200e0c728518a9be89b72cfcd (patch)
tree12c0211078e26c051ec832716055b086ab19f457 /core
parent5df98679672c12d96b4ac4d96ee17f1559207401 (diff)
downloadredot-engine-ca5ec6aec1b77b5200e0c728518a9be89b72cfcd.tar.gz
[Core] Fix crash when hashing empty `CharString`
Diffstat (limited to 'core')
-rw-r--r--core/templates/hashfuncs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/templates/hashfuncs.h b/core/templates/hashfuncs.h
index 2a212f3dcb..05960292f5 100644
--- a/core/templates/hashfuncs.h
+++ b/core/templates/hashfuncs.h
@@ -310,7 +310,7 @@ struct HashMapHasherDefault {
static _FORCE_INLINE_ uint32_t hash(const char16_t p_uchar) { return hash_fmix32(p_uchar); }
static _FORCE_INLINE_ uint32_t hash(const char32_t p_uchar) { return hash_fmix32(p_uchar); }
static _FORCE_INLINE_ uint32_t hash(const RID &p_rid) { return hash_one_uint64(p_rid.get_id()); }
- static _FORCE_INLINE_ uint32_t hash(const CharString &p_char_string) { return hash_djb2(p_char_string.ptr()); }
+ static _FORCE_INLINE_ uint32_t hash(const CharString &p_char_string) { return hash_djb2(p_char_string.get_data()); }
static _FORCE_INLINE_ uint32_t hash(const StringName &p_string_name) { return p_string_name.hash(); }
static _FORCE_INLINE_ uint32_t hash(const NodePath &p_path) { return p_path.hash(); }
static _FORCE_INLINE_ uint32_t hash(const ObjectID &p_id) { return hash_one_uint64(p_id); }