aboutsummaryrefslogtreecommitdiffstats
path: root/src/serd_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/serd_internal.h')
-rw-r--r--src/serd_internal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/serd_internal.h b/src/serd_internal.h
index acd66803..6a2893fb 100644
--- a/src/serd_internal.h
+++ b/src/serd_internal.h
@@ -156,7 +156,7 @@ serd_stack_push(SerdStack* stack, size_t n_bytes)
{
const size_t new_size = stack->size + n_bytes;
if (stack->buf_size < new_size) {
- stack->buf_size *= 2;
+ stack->buf_size += (stack->buf_size >> 1); // *= 1.5
stack->buf = (uint8_t*)realloc(stack->buf, stack->buf_size);
}
uint8_t* const ret = (stack->buf + stack->size);