]> granicus.if.org Git - php/commitdiff
#38105 (2/3) Filters should report char/UChar count, not bytes
authorSara Golemon <pollita@php.net>
Fri, 14 Jul 2006 19:15:31 +0000 (19:15 +0000)
committerSara Golemon <pollita@php.net>
Fri, 14 Jul 2006 19:15:31 +0000 (19:15 +0000)
main/streams/unicode_filter.c

index d54d8402e2e5be32590acce4d1b1c7fc1fe2e9c1..1f39f8b86ad28f46a2567fab184c468519c37c87 100644 (file)
@@ -79,7 +79,7 @@ static php_stream_filter_status_t php_unicode_to_string_filter(
                        php_stream_bucket_append(buckets_out, new_bucket TSRMLS_CC);
                        exit_status = PSFS_PASS_ON;
                }
-               consumed += UBYTES(bucket->buflen);
+               consumed += bucket->buflen;
                php_stream_bucket_delref(bucket TSRMLS_CC);
        }
 
@@ -131,7 +131,7 @@ static php_stream_filter_status_t php_unicode_from_string_filter(
                php_stream_bucket_unlink(bucket TSRMLS_CC);
                if (bucket->buf_type == IS_UNICODE) {
                        /* already in unicode, nothing to do */
-                       consumed += UBYTES(bucket->buflen);
+                       consumed += bucket->buflen;
                        php_stream_bucket_append(buckets_out, bucket TSRMLS_CC);
                        exit_status = PSFS_PASS_ON;
                        continue;