From 31c294dc4194f60fb5f8ae517e7f5d3caed69566 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 14 May 2019 00:05:32 +0200 Subject: [PATCH] shared/cgroup-show: fix off-by-one in column counting We'd get one column too many, and the trailing ellipsis would end up in the next row. --- src/shared/cgroup-show.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/cgroup-show.c b/src/shared/cgroup-show.c index 91a243944c..cac7922ec0 100644 --- a/src/shared/cgroup-show.c +++ b/src/shared/cgroup-show.c @@ -53,8 +53,8 @@ static void show_pid_array( if (flags & OUTPUT_FULL_WIDTH) n_columns = 0; else { - if (n_columns > pid_width+2) - n_columns -= pid_width+2; + if (n_columns > pid_width + 3) /* something like "├─1114784 " */ + n_columns -= pid_width + 3; else n_columns = 20; } -- 2.25.1