diff --git a/src/dict/modify.c b/src/dict/modify.c index 9d08bcc..75c511b 100644 --- a/src/dict/modify.c +++ b/src/dict/modify.c @@ -60,8 +60,8 @@ bool libcdsb_dict_update(dict_t* x, vtype_variable key, vtype_variable value, vo while (!is_null(c)) { if (vtype_compare(key.pointer, key.type, vnode_peek(&c->key, c->key_type), c->key_type) == 0) { - if (!callback) callback(libcdsb_variable_build(vnode_peek(&c->key, c->key_type), c->key_type), - libcdsb_variable_build(vnode_peek(&c->value, c->value_type), c->value_type), dt); + if (callback) callback(libcdsb_variable_build(vnode_peek(&c->key, c->key_type), c->key_type), + libcdsb_variable_build(vnode_peek(&c->value, c->value_type), c->value_type), dt); vnode_free(&c->value, c->value_type); @@ -94,8 +94,8 @@ bool libcdsb_dict_inject(dict_t* x, vtype_variable key, vtype_variable value, vo while (!is_null(c)) { if (vtype_compare(key.pointer, key.type, vnode_peek(&c->key, c->key_type), c->key_type) == 0) { - if (!callback) callback(libcdsb_variable_build(vnode_peek(&c->key, c->key_type), c->key_type), - libcdsb_variable_build(vnode_peek(&c->value, c->value_type), c->value_type), dt); + if (callback) callback(libcdsb_variable_build(vnode_peek(&c->key, c->key_type), c->key_type), + libcdsb_variable_build(vnode_peek(&c->value, c->value_type), c->value_type), dt); vnode_free(&c->key, c->key_type); vnode_free(&c->value, c->value_type);