summaryrefslogtreecommitdiff
path: root/pp_sort.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp_sort.c')
-rw-r--r--pp_sort.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pp_sort.c b/pp_sort.c
index f1ec82aec2..f96d5682f9 100644
--- a/pp_sort.c
+++ b/pp_sort.c
@@ -1679,6 +1679,9 @@ PP(pp_sort)
if (!(flags & OPf_SPECIAL)) {
SV *sv;
+ /* Reset cx, in case the context stack has been
+ reallocated. */
+ cx = &cxstack[cxstack_ix];
POPSUB(cx, sv);
LEAVESUB(sv);
}