Fixed utf8 decode (ticket #25).

Patch by Alexey Kuts.
This commit is contained in:
Maxim Dounin 2011-10-13 13:56:41 +00:00
parent 77ecc7fa14
commit c1308db7b2

View file

@ -1211,19 +1211,19 @@ ngx_utf8_decode(u_char **p, size_t n)
u = **p;
if (u > 0xf0) {
if (u >= 0xf0) {
u &= 0x07;
valid = 0xffff;
len = 3;
} else if (u > 0xe0) {
} else if (u >= 0xe0) {
u &= 0x0f;
valid = 0x7ff;
len = 2;
} else if (u > 0xc0) {
} else if (u >= 0xc2) {
u &= 0x1f;
valid = 0x7f;