aboutsummaryrefslogtreecommitdiff
path: root/liberty-tui.c
diff options
context:
space:
mode:
Diffstat (limited to 'liberty-tui.c')
-rw-r--r--liberty-tui.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/liberty-tui.c b/liberty-tui.c
index 4d48c2a..7cc9bfb 100644
--- a/liberty-tui.c
+++ b/liberty-tui.c
@@ -194,9 +194,7 @@ row_buffer_space (struct row_buffer *self, int width, chtype attrs)
if (width < 0)
return;
- while (self->chars_len + width >= self->chars_alloc)
- self->chars = xreallocarray (self->chars,
- sizeof *self->chars, (self->chars_alloc <<= 1));
+ ARRAY_RESERVE (self->chars, (size_t) width);
struct row_char space = { .attrs = attrs, .c = ' ', .width = 1 };
self->total_width += width;