diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-02-14 16:04:35 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-02-14 16:32:29 +0000 |
commit | 1c90055717b05b3f652bf543a46419001314c53e (patch) | |
tree | e6eac2f381180ba4613ffe3befb4373fe9ea4ad6 /pp.c | |
parent | 777f7c561610dee641c77666e5a4a0d9ac1d4230 (diff) | |
download | perl-1c90055717b05b3f652bf543a46419001314c53e.tar.gz |
Remove a vestigial STRLEN case and convert a label to lowercase.
(Tweaking 777f7c561610dee6.)
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -3139,12 +3139,12 @@ PP(pp_substr) UV pos1_uv = pos1_iv-arybase; /* Overflow can occur when $[ < 0 */ if (arybase < 0 && pos1_uv < (UV)pos1_iv) - goto BOUND_FAIL; + goto bound_fail; pos1_iv = pos1_uv; pos1_is_uv = 1; } else if (pos1_is_uv ? (UV)pos1_iv > 0 : pos1_iv > 0) { - goto BOUND_FAIL; /* $[=3; substr($_,2,...) */ + goto bound_fail; /* $[=3; substr($_,2,...) */ } else { /* pos < $[ */ if (pos1_iv == 0) { /* $[=1; substr($_,0,...) */ @@ -3159,7 +3159,7 @@ PP(pp_substr) } if (pos1_is_uv || pos1_iv > 0) { if ((UV)pos1_iv > curlen) - goto BOUND_FAIL; + goto bound_fail; } if (num_args > 2) { @@ -3189,7 +3189,7 @@ PP(pp_substr) if (!pos2_is_uv && pos2_iv < 0) { if (!pos1_is_uv && pos1_iv < 0) - goto BOUND_FAIL; + goto bound_fail; pos2_iv = 0; } else if (!pos1_is_uv && pos1_iv < 0) @@ -3277,7 +3277,7 @@ PP(pp_substr) PUSHs(TARG); /* avoid SvSETMAGIC here */ RETURN; -BOUND_FAIL: +bound_fail: if (lvalue || repl) Perl_croak(aTHX_ "substr outside of string"); Perl_ck_warner(aTHX_ packWARN(WARN_SUBSTR), "substr outside of string"); |