summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2021-07-19 07:41:46 +0000
committerNicholas Clark <nick@ccl4.org>2021-08-30 07:40:21 +0000
commitc3cbbb2661957f51a90ec21f9b18dc6257f433fa (patch)
treefd5d1a2ff3b8b38cb8468856a8a12113af522909 /dist
parent28fa70671c9cb3bac12111a501950533fbb2ff35 (diff)
downloadperl-c3cbbb2661957f51a90ec21f9b18dc6257f433fa.tar.gz
Fix a bug in the recursion depth check in store_lhash().
The recursion depth check was not being cleaned up correctly, causing an assertion failure in testing. This suggests that this routine likely wasn't well tested.
Diffstat (limited to 'dist')
-rw-r--r--dist/Storable/Storable.xs2
1 files changed, 1 insertions, 1 deletions
diff --git a/dist/Storable/Storable.xs b/dist/Storable/Storable.xs
index 101ee9407d..87846a4e4c 100644
--- a/dist/Storable/Storable.xs
+++ b/dist/Storable/Storable.xs
@@ -3178,7 +3178,7 @@ static int store_lhash(pTHX_ stcxt_t *cxt, HV *hv, unsigned char hash_flags)
entry = HeNEXT(entry);
}
}
- if (recur_sv == (SV*)hv && cxt->max_recur_depth_hash != -1 && cxt->recur_depth > 0) {
+ if (recur_sv != (SV*)hv && cxt->max_recur_depth_hash != -1 && cxt->recur_depth > 0) {
TRACEME(("recur_depth --%" IVdf, cxt->recur_depth));
--cxt->recur_depth;
}