projects
/
p5sagit/p5-mst-13.2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
87b5b73
)
Avoid a segfault when reversing an empty array in-place.
Rafael Garcia-Suarez [Wed, 31 Mar 2010 07:50:00 +0000 (09:50 +0200)]
pp.c
patch
|
blob
|
blame
|
history
diff --git
a/pp.c
b/pp.c
index
5876cfd
..
daa63af
100644
(file)
--- 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;