summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-02-20 22:15:23 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-02-20 22:15:23 +0000
commit36fec512d0f14b1b52f266589c60192b619fa2ff (patch)
tree1c1466f9cbc46151403b2a20431733d598c5ab6a /utf8.c
parente486a898ae6f84b70e35d58345c832b5915d9e9f (diff)
downloadperl-36fec512d0f14b1b52f266589c60192b619fa2ff.tar.gz
In EBCDIC the UNI_TO_NATIVE() macro evaluates its argument
twice, causing the loop to skip every other character. p4raw-id: //depot/perl@14800
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/utf8.c b/utf8.c
index 7dbb71f7df..6fc4acd214 100644
--- a/utf8.c
+++ b/utf8.c
@@ -1341,8 +1341,10 @@ Perl_to_utf8_case(pTHX_ U8 *p, U8* ustrp, STRLEN *lenp, SV **swashp, char *norma
}
}
else {
- while (t < tend)
- d = uvchr_to_utf8(d, UNI_TO_NATIVE(*t++));
+ while (t < tend) {
+ d = uvchr_to_utf8(d, UNI_TO_NATIVE(*t));
+ t++;
+ }
}
len = d - tmpbuf;
Copy(tmpbuf, ustrp, len, U8);