mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 16:39:36 +00:00
Use remove more uses of utf8_to_uvchr()
Commit 4b88fb76efce8c436e63b907c9842345d4fa77c7 missed 2 occurrences of this, one of which is #ifdef'd out.
This commit is contained in:
parent
80050966fb
commit
6bd1c396b2
4
utf8.c
4
utf8.c
@ -2221,7 +2221,7 @@ Perl_to_utf8_case(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp,
|
||||
STRLEN tlen = 0;
|
||||
|
||||
while (t < tend) {
|
||||
const UV c = utf8_to_uvchr(t, &tlen);
|
||||
const UV c = utf8_to_uvchr_buf(t, tend, &tlen);
|
||||
if (tlen > 0) {
|
||||
d = uvchr_to_utf8(d, UNI_TO_NATIVE(c));
|
||||
t += tlen;
|
||||
@ -2262,7 +2262,7 @@ Perl_to_utf8_case(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp,
|
||||
if (lenp)
|
||||
*lenp = len;
|
||||
|
||||
return len ? utf8_to_uvchr(ustrp, 0) : 0;
|
||||
return len ? valid_utf8_to_uvchr(ustrp, 0) : 0;
|
||||
}
|
||||
|
||||
STATIC UV
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user