Merging r4210:

Fixed utf8 decode (ticket #25).

Patch by Alexey Kuts.
This commit is contained in:
Igor Sysoev 2011-11-01 14:20:43 +00:00
parent 5d743f5d2f
commit 6155bf1ed2
1 changed files with 3 additions and 3 deletions

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;