summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/shared/logs-show.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
index 43e42f7880..a68cd3de57 100644
--- a/src/shared/logs-show.c
+++ b/src/shared/logs-show.c
@@ -228,7 +228,7 @@ static int output_short(sd_journal *j, unsigned line, unsigned n_columns,
} else if ((flags & OUTPUT_FULL_WIDTH) ||
(message_len + n < n_columns))
printf(": %.*s\n", (int) message_len, message);
- else if (n < n_columns) {
+ else if (n < n_columns && n_columns - n - 2 >= 3) {
char *e;
e = ellipsize_mem(message, message_len, n_columns - n - 2, 90);