From baef5914cd008084720e89b929d017a1d2467e25 Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Sun, 5 Mar 2023 22:11:28 +0100 Subject: [PATCH] Fix hashing const string and gc string differently --- src/value.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/value.c b/src/value.c index 10d4a1f..5e59ea6 100644 --- a/src/value.c +++ b/src/value.c @@ -739,7 +739,8 @@ apfl_value_set_cow_flag(struct apfl_value value) apfl_hash apfl_value_hash(const struct apfl_value value) { - apfl_hash hash = apfl_hash_fnv1a(&value.type, sizeof(enum value_type)); + enum apfl_value_type type = apfl_value_type_to_abstract_type(value.type); + apfl_hash hash = apfl_hash_fnv1a(&type, sizeof(enum apfl_value_type)); struct apfl_string_view sv;