summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--text-utils/column.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/text-utils/column.c b/text-utils/column.c
index 87a6fc790..5b52339f6 100644
--- a/text-utils/column.c
+++ b/text-utils/column.c
@@ -308,8 +308,10 @@ maketbl()
for (i = lens[coloff] - t->len[coloff] + 2; i > 0; i--)
putwchar(' ');
}
- fputws(t->list[coloff], stdout);
- putwchar('\n');
+ if (coloff < t->cols) {
+ fputws(t->list[coloff], stdout);
+ putwchar('\n');
+ }
}
}