summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-07-10 20:10:23 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-07-10 20:10:23 +0000
commitae9ddab8efcabe555532e808ce7c80ab076a209e (patch)
treeb33b1e1bea1b3501b445806747441244397144ba /regexec.c
parent5eb9fe8fe9c9104d4fe0d9127fe7389780f8a479 (diff)
downloadperl-ae9ddab8efcabe555532e808ce7c80ab076a209e.tar.gz
Retract #17375: contrary to intention, it was actually
harmful on EBCDIC (configpm broke). p4raw-id: //depot/perl@17467
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/regexec.c b/regexec.c
index bdc05af088..4f403a0443 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)) {