mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00
sizeof(char) != sizeof(UChar) Don't tell ucnv_toUnicode it has more space than it really does
This commit is contained in:
parent
b01df7d793
commit
23b729dc15
1 changed files with 1 additions and 1 deletions
|
@ -144,7 +144,7 @@ static php_stream_filter_status_t php_unicode_from_string_filter(
|
||||||
|
|
||||||
destp = destbuf = (UChar *)pemalloc(destlen, data->is_persistent);
|
destp = destbuf = (UChar *)pemalloc(destlen, data->is_persistent);
|
||||||
|
|
||||||
ucnv_toUnicode(data->conv, &destp, destbuf + destlen, (const char**)&src, src + remaining, NULL, FALSE, &errCode);
|
ucnv_toUnicode(data->conv, &destp, (UChar*)((char*)destbuf + destlen), (const char**)&src, src + remaining, NULL, FALSE, &errCode);
|
||||||
|
|
||||||
new_bucket = php_stream_bucket_new_unicode(stream, destbuf, destp - destbuf, 1, data->is_persistent TSRMLS_CC);
|
new_bucket = php_stream_bucket_new_unicode(stream, destbuf, destp - destbuf, 1, data->is_persistent TSRMLS_CC);
|
||||||
php_stream_bucket_append(buckets_out, new_bucket TSRMLS_CC);
|
php_stream_bucket_append(buckets_out, new_bucket TSRMLS_CC);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue