Fix lake_hash_has

This commit is contained in:
Sami Samhuri 2022-02-21 19:36:08 -08:00
parent b24d30af75
commit f3d6b44eff
No known key found for this signature in database
GPG key ID: 4B4195422742FC16

View file

@ -28,5 +28,5 @@ void *lake_hash_get(khash_t(LakeVal) * h, char *key)
bool lake_hash_has(khash_t(LakeVal) * h, char *key)
{
khiter_t k = kh_get(LakeVal, h, key);
return kh_exist(h, k);
return k != kh_end(h) && kh_exist(h, k);
}