diff options
author | Nicholas Clark <nick@ccl4.org> | 2021-08-23 15:48:49 +0000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2021-08-25 14:41:55 +1000 |
commit | 364906c750e4f6e22ac4bb4d6b3742a1df87f976 (patch) | |
tree | dfcbbf27c3f94a44fc6e63c6055c91f89989585f /pp_sys.c | |
parent | 0f8b2f1e9307d973e41d064806756140723a2f31 (diff) | |
download | perl-364906c750e4f6e22ac4bb4d6b3742a1df87f976.tar.gz |
pp_tie should completely reset the underlying hash's iterator state.
Previously it would mangle it, resetting EITER but not RITER, meaning that
after untie continuing iteration would be inconsistent - normally it would
carry on exactly where it left off, but if iteration had been in the middle
of a chain of HEs, it would skip the rest of the chain.
Fixes GH #19077
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -881,6 +881,7 @@ PP(pp_tie) hv_free_ent((HV *)varsv, entry); } HvEITER_set(MUTABLE_HV(varsv), 0); + HvRITER_set(MUTABLE_HV(varsv), -1); break; } case SVt_PVAV: |