diff options
| author | Xinchen Hui <laruence@gmail.com> | 2014-05-05 13:58:23 +0800 |
|---|---|---|
| committer | Xinchen Hui <laruence@gmail.com> | 2014-05-05 13:58:23 +0800 |
| commit | cd00ea999360cd84750010d57b8c1b1cba7125f1 (patch) | |
| tree | b6d983eec10d08301dd1df0db307358787eca448 /ext/standard/php_smart_str.h | |
| parent | ea33fbd833413b2d14ba8d05a8513dcc0bdda811 (diff) | |
| download | php-git-cd00ea999360cd84750010d57b8c1b1cba7125f1.tar.gz | |
Port iconv (all tests passes)
Diffstat (limited to 'ext/standard/php_smart_str.h')
| -rw-r--r-- | ext/standard/php_smart_str.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/standard/php_smart_str.h b/ext/standard/php_smart_str.h index 5cc3a62137..81b92d7a80 100644 --- a/ext/standard/php_smart_str.h +++ b/ext/standard/php_smart_str.h @@ -45,7 +45,9 @@ #ifdef SMART_STR_USE_REALLOC #define SMART_STR_DO_REALLOC(b, w) do { \ + int oldlen = (b)->s->len; \ (b)->s = erealloc((buf)->s, _STR_HEADER_SIZE + (b)->a + 1); \ + (b)->s->len = oldlen; \ } while (0) #else #define SMART_STR_DO_REALLOC(b, w) do { \ |
