diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2011-10-13 17:56:41 +0400 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2011-10-13 17:56:41 +0400 |
commit | ba76a89d4b90fb608cdfa0968c7a3fa324feb665 (patch) | |
tree | 9dad010014ba9624cc9bafa732a7a39061a69d07 /src/core/ngx_string.c | |
parent | d51bcf6f633998862a9a8064ec481840620073ec (diff) |
Fixed utf8 decode (ticket #25).
Patch by Alexey Kuts.
Diffstat (limited to 'src/core/ngx_string.c')
-rw-r--r-- | src/core/ngx_string.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/ngx_string.c b/src/core/ngx_string.c index 8f29e9070..29f8e0d67 100644 --- a/src/core/ngx_string.c +++ b/src/core/ngx_string.c @@ -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; |