diff --git a/src/spx_php.c b/src/spx_php.c index f56ef40..ad951d6 100644 --- a/src/spx_php.c +++ b/src/spx_php.c @@ -346,7 +346,7 @@ char * spx_php_build_command_line(void) goto error; } - spx_str_builder_t * str_builder = spx_str_builder_create(1024); + spx_str_builder_t * str_builder = spx_str_builder_create(2 * 1024); if (!str_builder) { goto error; } diff --git a/src/spx_str_builder.c b/src/spx_str_builder.c index ef3a655..959f0ae 100644 --- a/src/spx_str_builder.c +++ b/src/spx_str_builder.c @@ -233,10 +233,10 @@ size_t spx_str_builder_append_str(spx_str_builder_t * str_builder, const char * p[c++] = *str; str++; + str_builder->size++; } p[c] = 0; - str_builder->size += c; return c; }