From: Larry Wall Date: Fri, 7 Aug 1998 12:25:12 +0000 (-0700) Subject: substr() assumes utf8 without say-so X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d1c2b58ac830663c9c79b4948c8989557cac76b8;p=p5sagit%2Fp5-mst-13.2.git substr() assumes utf8 without say-so Message-Id: <199808071925.MAA13436@wall.org> Subject: [PATCH 5.005_50] substr bug? p4raw-id: //depot/perl@1768 --- diff --git a/pp.c b/pp.c index 2d2aa4c..3accab2 100644 --- a/pp.c +++ b/pp.c @@ -1839,6 +1839,8 @@ PP(pp_substr) else curlen = utfcurlen; } + else + utfcurlen = 0; if (pos >= arybase) { pos -= arybase;