Berry allow bool key (#17902)

This commit is contained in:
s-hadinger 2023-02-07 02:55:12 +01:00 committed by GitHub
parent 4cb9acec65
commit dc245c57b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -112,6 +112,7 @@ static int eqnode(bvm *vm, bmapnode *node, bvalue *key, uint32_t hash)
#endif
if(keytype(k) == key->type && hashcode(k) == hash) {
switch (key->type) {
case BE_BOOL: return var_tobool(key) == var_tobool(k);
case BE_INT: return var_toint(key) == var_toint(k);
case BE_REAL: return var_toreal(key) == var_toreal(k);
case BE_STRING: return be_eqstr(var_tostr(key), var_tostr(k));