summaryrefslogtreecommitdiff
path: root/ext/mbstring/libmbfl/mbfl
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2017-07-20 21:14:01 +0200
committerNikita Popov <nikita.ppv@gmail.com>2017-07-20 21:41:52 +0200
commita319063aaeaad817cd777a373c5b8ac6a26950d1 (patch)
tree73a2d4331c57beef24abfaff5fd9e0e588bc0e30 /ext/mbstring/libmbfl/mbfl
parent1388751f10799a240fa4cd62285c3b5c7acb235b (diff)
downloadphp-git-a319063aaeaad817cd777a373c5b8ac6a26950d1.tar.gz
Only write single terminating byte
As far as I could determine this is sufficient. It avoids reallocating the buffer, if it was perfectly allocated beforehand.
Diffstat (limited to 'ext/mbstring/libmbfl/mbfl')
-rw-r--r--ext/mbstring/libmbfl/mbfl/mbfl_memory_device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_memory_device.c b/ext/mbstring/libmbfl/mbfl/mbfl_memory_device.c
index 5a28613014..176a752288 100644
--- a/ext/mbstring/libmbfl/mbfl/mbfl_memory_device.c
+++ b/ext/mbstring/libmbfl/mbfl/mbfl_memory_device.c
@@ -119,7 +119,7 @@ mbfl_memory_device_result(mbfl_memory_device *device, mbfl_string *result)
{
if (device && result) {
result->len = device->pos;
- mbfl_memory_device_output4('\0', device);
+ mbfl_memory_device_output('\0', device);
result->val = device->buffer;
device->buffer = (unsigned char *)0;
device->length = 0;