predicate.d: fix equalp for hash tables

According to the spec, we should compare values using equalp if two
matching keys are found, but we were only checking if matching keys
exist.
Fixes #587.
This commit is contained in:
Marius Gerbershagen 2020-05-10 22:09:01 +02:00
parent f7f0edebd6
commit ecb71b194a

View file

@ -574,7 +574,9 @@ ecl_equalp(cl_object x, cl_object y)
return TRUE;
} else {
cl_object key = env->values[1];
if (ecl_gethash_safe(key, y, OBJNULL) == OBJNULL)
cl_object x_value = env->values[2];
cl_object y_value = ecl_gethash_safe(key, y, OBJNULL);
if (y_value == OBJNULL || !ecl_equalp(x_value, y_value))
return FALSE;
}
} while (1);