From e794ffd97b3f8a8fae64ccddd5ffd80b2f399f49 Mon Sep 17 00:00:00 2001 From: belliash Date: Fri, 19 Apr 2019 20:16:42 +0200 Subject: [PATCH] Fix PH7_HashmapDup(). This function needs to store the next index. Otherwise it will start to count from beginning, duplicating existing keys. --- engine/hashmap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engine/hashmap.c b/engine/hashmap.c index 92ad867..e80d427 100644 --- a/engine/hashmap.c +++ b/engine/hashmap.c @@ -1036,6 +1036,8 @@ PH7_PRIVATE sxi32 PH7_HashmapDup(ph7_hashmap *pSrc, ph7_hashmap *pDest) { /* Point to the next entry */ pEntry = pEntry->pPrev; /* Reverse link */ } + /* Save the next array index */ + pDest->iNextIdx = pSrc->iNextIdx; return SXRET_OK; } /*