summaryrefslogtreecommitdiff
path: root/ext/json/utf8_decode.c
diff options
context:
space:
mode:
authorScott MacVicar <scottmac@php.net>2009-01-02 03:02:22 +0000
committerScott MacVicar <scottmac@php.net>2009-01-02 03:02:22 +0000
commit0bdbc4e356d81fd2fd7e1f2391e24e76c2f3b8f6 (patch)
treeb62b4615b40808b430f3b0c8f69fbe5aa416c3b3 /ext/json/utf8_decode.c
parent8d62f3dd0201094f589fa8c64ab337e5edcf43e6 (diff)
downloadphp-git-0bdbc4e356d81fd2fd7e1f2391e24e76c2f3b8f6.tar.gz
MFH Fix bug #46944 - UTF-8 characters outside the BMP aren't encoded correctly.
Diffstat (limited to 'ext/json/utf8_decode.c')
-rw-r--r--ext/json/utf8_decode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/json/utf8_decode.c b/ext/json/utf8_decode.c
index cea1f8cec8..2d0422bedb 100644
--- a/ext/json/utf8_decode.c
+++ b/ext/json/utf8_decode.c
@@ -165,7 +165,7 @@ utf8_decode_next(json_utf8_decode *utf8)
/*
Three continuation (65536 to 1114111)
*/
- if ((c & 0xF1) == 0xF0) {
+ if ((c & 0xF8) == 0xF0) {
int c1 = cont(utf8);
int c2 = cont(utf8);
int c3 = cont(utf8);