Fix hashing const string and gc string differently

This commit is contained in:
Laria 2023-03-05 22:11:28 +01:00
parent 2666c0f148
commit baef5914cd

View file

@ -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;