improve emitter_off_ex

This commit is contained in:
xianjimli 2019-12-19 09:16:25 +08:00
parent 09b56c1d4b
commit 48b1152064

View File

@ -211,7 +211,7 @@ static ret_t emitter_off_ex(emitter_t* emitter, tk_compare_t cmp, void* ctx) {
emitter_item_t* prev = emitter->items;
while (iter != NULL) {
if ((emitter->curr_iter != iter || !emitter->remove_curr_iter) && cmp(iter, ctx) == 0) {
if (cmp(iter, ctx) == 0) {
return emitter_remove(emitter, prev, iter);
}