X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pp.c;h=4735c94cfbc60b81b41df4cbc8fdedd01bd92805;hb=b386fa440d8266b7c2eb26f47b6c2a7d315a0128;hp=c659b13a1f2908a501d2c369a9b0c6cdc501ec01;hpb=9e95c6350a60744dacec44c6ca81c954dd83a920;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pp.c b/pp.c index c659b13..4735c94 100644 --- a/pp.c +++ b/pp.c @@ -3079,12 +3079,12 @@ PP(pp_substr) { dVAR; dSP; dTARGET; SV *sv; - I32 len = 0; + IV len = 0; STRLEN curlen; STRLEN utf8_curlen; - I32 pos; - I32 rem; - I32 fail; + IV pos; + IV rem; + IV fail; const I32 lvalue = PL_op->op_flags & OPf_MOD || LVRET; const char *tmps; const I32 arybase = CopARYBASE_get(PL_curcop); @@ -3147,7 +3147,7 @@ PP(pp_substr) rem = curlen; else if (len >= 0) { rem = pos+len; - if (rem > (I32)curlen) + if (rem > (IV)curlen) rem = curlen; } else { @@ -3167,8 +3167,8 @@ PP(pp_substr) RETPUSHUNDEF; } else { - const I32 upos = pos; - const I32 urem = rem; + const IV upos = pos; + const IV urem = rem; if (utf8_curlen) sv_pos_u2b(sv, &pos, &rem); tmps += pos;