X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=str.c;h=bbea53ef563cd8070c09e3c38f1bd10108a0a0dc;hb=79a0689e17f959bdb246dc37bbbbfeba4c2b3b56;hp=498e7428f2b6c5130bbb67720d50aedb446ce1ad;hpb=ff2452de34aca0717369277df00e15764613e5c1;p=p5sagit%2Fp5-mst-13.2.git diff --git a/str.c b/str.c index 498e742..bbea53e 100644 --- a/str.c +++ b/str.c @@ -1,4 +1,4 @@ -/* $Header: str.c,v 3.0.1.5 90/02/28 18:30:38 lwall Locked $ +/* $Header: str.c,v 3.0.1.6 90/03/12 17:02:14 lwall Locked $ * * Copyright (c) 1989, Larry Wall * @@ -6,6 +6,9 @@ * as specified in the README file that comes with the perl 3.0 kit. * * $Log: str.c,v $ + * Revision 3.0.1.6 90/03/12 17:02:14 lwall + * patch13: substr as lvalue didn't invalidate old numeric value + * * Revision 3.0.1.5 90/02/28 18:30:38 lwall * patch9: you may now undef $/ to have no input record separator * patch9: nested evals clobbered their longjmp environment @@ -459,6 +462,9 @@ int littlelen; register char *bigend; register int i; + bigstr->str_nok = 0; + bigstr->str_pok = SP_VALID; /* disable possible screamer */ + i = littlelen - len; if (i > 0) { /* string might grow */ STR_GROW(bigstr, bigstr->str_cur + i + 1); @@ -486,8 +492,6 @@ int littlelen; if (midend > bigend) fatal("panic: str_insert"); - bigstr->str_pok = SP_VALID; /* disable possible screamer */ - if (mid - big > bigend - midend) { /* faster to shorten from end */ if (littlelen) { (void)bcopy(little, mid, littlelen);