This function needs to store the next index. Otherwise it will start to count from beginning, duplicating existing keys.
This commit is contained in:
parent
16c6b8d970
commit
e794ffd97b
|
@ -1036,6 +1036,8 @@ PH7_PRIVATE sxi32 PH7_HashmapDup(ph7_hashmap *pSrc, ph7_hashmap *pDest) {
|
||||||
/* Point to the next entry */
|
/* Point to the next entry */
|
||||||
pEntry = pEntry->pPrev; /* Reverse link */
|
pEntry = pEntry->pPrev; /* Reverse link */
|
||||||
}
|
}
|
||||||
|
/* Save the next array index */
|
||||||
|
pDest->iNextIdx = pSrc->iNextIdx;
|
||||||
return SXRET_OK;
|
return SXRET_OK;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user