X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl.c;h=291021c913a3eaf4761bea1e5fe17a6ed10ce608;hb=597c4554ca87aa4325a00c70a0fbb22acbfcfa07;hp=d7a07eb95968a9481db1b5fb1b6c0aca3d4a7221;hpb=a2e578dad2f237dd09854deb3a557d2eeeb56a83;p=p5sagit%2Fp5-mst-13.2.git diff --git a/perl.c b/perl.c index d7a07eb..291021c 100644 --- a/perl.c +++ b/perl.c @@ -1977,7 +1977,6 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit) #endif (s = PerlEnv_getenv("PERL5OPT"))) { - const char *popt = s; while (isSPACE(*s)) s++; if (*s == '-' && *(s+1) == 'T') { @@ -1988,7 +1987,7 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit) else { char *popt_copy = NULL; while (s && *s) { - char *d; + const char *d; while (isSPACE(*s)) s++; if (*s == '-') { @@ -2004,9 +2003,9 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit) while (++s && *s) { if (isSPACE(*s)) { if (!popt_copy) { - popt_copy = SvPVX(sv_2mortal(newSVpv(popt,0))); - s = popt_copy + (s - popt); - d = popt_copy + (d - popt); + popt_copy = SvPVX(sv_2mortal(newSVpv(d,0))); + s = popt_copy + (s - d); + d = popt_copy; } *s++ = '\0'; break;