summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp.c b/pp.c
index 5876cfd607..daa63af9a4 100644
--- a/pp.c
+++ b/pp.c
@@ -5420,7 +5420,7 @@ PP(pp_reverse)
SV **begin = AvARRAY(av);
SV **end = begin + AvFILLp(av);
- while (begin < end) {
+ while (begin && begin < end) {
register SV * const tmp = *begin;
*begin++ = *end;
*end-- = tmp;