From: Jarkko Hietaniemi Date: Wed, 10 Jul 2002 20:10:23 +0000 (+0000) Subject: Retract #17375: contrary to intention, it was actually X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ae9ddab8efcabe555532e808ce7c80ab076a209e;p=p5sagit%2Fp5-mst-13.2.git Retract #17375: contrary to intention, it was actually harmful on EBCDIC (configpm broke). p4raw-id: //depot/perl@17467 --- diff --git a/regexec.c b/regexec.c index bdc05af..4f403a0 100644 --- a/regexec.c +++ b/regexec.c @@ -4331,13 +4331,12 @@ S_reginclass(pTHX_ register regnode *n, register U8* p, STRLEN* lenp, register b char flags = ANYOF_FLAGS(n); bool match = FALSE; UV c = *p; - STRLEN len = 1; + STRLEN len = 0; STRLEN plen; - c = (do_utf8 && !UTF8_IS_INVARIANT(c)) ? - utf8n_to_uvchr(p, UTF8_MAXLEN, &len, - ckWARN(WARN_UTF8) ? 0 : UTF8_ALLOW_ANY) : - NATIVE_TO_UTF(c); + if (do_utf8 && !UTF8_IS_INVARIANT(c)) + c = utf8n_to_uvchr(p, UTF8_MAXLEN, &len, + ckWARN(WARN_UTF8) ? 0 : UTF8_ALLOW_ANY); plen = lenp ? *lenp : UNISKIP(NATIVE_TO_UNI(c)); if (do_utf8 || (flags & ANYOF_UNICODE)) {