svn: /php/php-src/trunk/ext/mbstring/libmbfl/filters/ mbfilter_utf8.c
| From: | Rui Hirokawa | Date: | Wed, 07 Sep 2011 14:30:06 +0000 |
| Subject: | svn: /php/php-src/trunk/ext/mbstring/libmbfl/filters/ mbfilter_utf8.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-66361@lists.php.net to get a copy of this message | ||
hirokawa Wed, 07 Sep 2011 14:30:06 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=316357
Log:
fixed invalid utf-8 check.
Changed paths:
U php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_utf8.c
Modified: php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_utf8.c
===================================================================
--- php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_utf8.c 2011-09-07 14:25:12 UTC (rev
316356)
+++ php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_utf8.c 2011-09-07 14:30:06 UTC (rev
316357)
@@ -101,10 +101,15 @@
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) {