projects
/
p5sagit/p5-mst-13.2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
c8e4cf8
)
Perl_sv_chop() can return early if it's being asked to do nothing.
Nicholas Clark [Sat, 29 Dec 2007 13:33:38 +0000 (13:33 +0000)]
p4raw-id: //depot/perl@32763
sv.c
patch
|
blob
|
blame
|
history
diff --git
a/sv.c
b/sv.c
index
3e7c3ff
..
913a5da
100644
(file)
--- a/
sv.c
+++ b/
sv.c
@@
-4211,6
+4211,10
@@
Perl_sv_chop(pTHX_ register SV *sv, register const char *ptr)
if (!ptr || !SvPOKp(sv))
return;
delta = ptr - SvPVX_const(sv);
+ if (!delta) {
+ /* Nothing to do. */
+ return;
+ }
SV_CHECK_THINKFIRST(sv);
if (SvTYPE(sv) < SVt_PVIV)
sv_upgrade(sv,SVt_PVIV);