summaryrefslogtreecommitdiff
path: root/column.c
diff options
context:
space:
mode:
Diffstat (limited to 'column.c')
-rw-r--r--column.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/column.c b/column.c
index f9fda68..d55ead1 100644
--- a/column.c
+++ b/column.c
@@ -173,9 +173,8 @@ static void display_table(const struct string_list *list,
if (colopts & COL_DENSE)
shrink_columns(&data);
- empty_cell = xmalloc(initial_width + 1);
+ empty_cell = xmallocz(initial_width);
memset(empty_cell, ' ', initial_width);
- empty_cell[initial_width] = '\0';
for (y = 0; y < data.rows; y++) {
for (x = 0; x < data.cols; x++)
if (display_cell(&data, initial_width, empty_cell, x, y))