From 9438407ebf3bfccdb130468639cddc89755ffdc2 Mon Sep 17 00:00:00 2001 From: belliash Date: Sun, 24 Mar 2019 09:01:38 +0100 Subject: [PATCH] Never store an element if there is no callback function specified. --- engine/hashmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/hashmap.c b/engine/hashmap.c index d893d51..ff8b5d5 100644 --- a/engine/hashmap.c +++ b/engine/hashmap.c @@ -5150,8 +5150,8 @@ static int ph7_hashmap_filter(ph7_context *pCtx, int nArg, ph7_value **apArg) { } PH7_MemObjRelease(&sResult); } else { - /* No available callback,check for empty item */ - keep = !PH7_MemObjIsEmpty(pValue); + /* No available callback */ + keep = FALSE; } if(keep) { /* Perform the insertion,now the callback returned true */