diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-06-28 13:02:01 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-06-28 13:02:01 +0000 |
commit | d041010ff66d9b5d3b85efa7fc10fc3b0e425474 (patch) | |
tree | 344ad850ee4a446c472eb1f5ae7341f1f6b860d8 /regexec.c | |
parent | ea76dfa3073d73d670fe40809690f6342f2f4549 (diff) | |
download | perl-d041010ff66d9b5d3b85efa7fc10fc3b0e425474.tar.gz |
(retracted by #17467)
EBCDIC-safer.
p4raw-id: //depot/perl@17375
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -4329,12 +4329,13 @@ 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 = 0; + STRLEN len = 1; STRLEN plen; - if (do_utf8 && !UTF8_IS_INVARIANT(c)) - c = utf8n_to_uvchr(p, UTF8_MAXLEN, &len, - ckWARN(WARN_UTF8) ? 0 : UTF8_ALLOW_ANY); + 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); plen = lenp ? *lenp : UNISKIP(NATIVE_TO_UNI(c)); if (do_utf8 || (flags & ANYOF_UNICODE)) { |