diff options
author | Shawn Landen <shawnlandden@gmail.com> | 2012-08-03 02:28:28 +0000 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2012-08-03 18:12:07 +0200 |
commit | 193556b69e982fd37f88209c26a5783245cf2437 (patch) | |
tree | c5f4d81a60b17c7ec78c6a76834aa732611544ec /src | |
parent | 871b876ecc6921a70b5f5e15cb9f85e0b6f2d1a5 (diff) |
logs-show: fix off-by-one error
Ellipsize lines that are one character too long.
Diffstat (limited to 'src')
-rw-r--r-- | src/shared/logs-show.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c index c72ebc11f5..b6e6a85819 100644 --- a/src/shared/logs-show.c +++ b/src/shared/logs-show.c @@ -246,7 +246,7 @@ static int output_short(sd_journal *j, unsigned line, unsigned n_columns, char bytes[FORMAT_BYTES_MAX]; printf(": [%s blob data]\n", format_bytes(bytes, sizeof(bytes), message_len)); } else if ((flags & OUTPUT_FULL_WIDTH) || - (message_len + n < n_columns)) + (message_len + n + 1 < n_columns)) printf(": %s%.*s%s\n", color_on, (int) message_len, message, color_off); else if (n < n_columns && n_columns - n - 2 >= 3) { char *e; |