diff options
| author | Rui Hirokawa <hirokawa@php.net> | 2011-09-07 14:30:38 +0000 |
|---|---|---|
| committer | Rui Hirokawa <hirokawa@php.net> | 2011-09-07 14:30:38 +0000 |
| commit | 0d2aa8591b408db6f694914bcf95b4a9d87791b5 (patch) | |
| tree | 529a7c02f9722fd0ff793f4ee8ab123732194e89 /ext/mbstring/libmbfl | |
| parent | e5553b210afeb5194bf7cf133965292be6d421d8 (diff) | |
| download | php-git-0d2aa8591b408db6f694914bcf95b4a9d87791b5.tar.gz | |
MFH: fixed invalid utf-8 check.
Diffstat (limited to 'ext/mbstring/libmbfl')
| -rw-r--r-- | ext/mbstring/libmbfl/filters/mbfilter_utf8.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf8.c b/ext/mbstring/libmbfl/filters/mbfilter_utf8.c index 4167134432..ec7fab3564 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf8.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf8.c @@ -101,10 +101,15 @@ int mbfl_filt_conv_utf8_wchar(int c, mbfl_convert_filter *filter) int s, c1, w = 0, flag = 0; if (c < 0x80) { + if (filter->status != 0) { + w = (filter->cache & MBFL_WCSGROUP_MASK) | MBFL_WCSGROUP_THROUGH; + CK((*filter->output_function)(w, filter->data)); + filter->status = 0; + filter->cache = 0; + } if (c >= 0) { CK((*filter->output_function)(c, filter->data)); } - filter->status = 0; } else if (c < 0xc0) { int status = filter->status & 0xff; switch (status) { |
