top: small fix for command line wrapping
authorDenis Vlasenko <vda.linux@googlemail.com>
Sat, 8 Sep 2007 17:42:00 +0000 (17:42 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Sat, 8 Sep 2007 17:42:00 +0000 (17:42 -0000)
procps/top.c

index 529db5f7b3fb641bdbe94ff9879084da3d13fceb..ac3b7e5a29de6fba6eac301e6629986f3df438d7 100644 (file)
@@ -474,8 +474,8 @@ static NOINLINE void display_process_list(int count, int scr_width)
                                , SHOW_STAT(pcpu)
 #endif
                );
-               if (col < scr_width)
-                       read_cmdline(line_buf + col, scr_width - col, s->pid, s->comm);
+               if (col + 1 < scr_width)
+                       read_cmdline(line_buf + col, scr_width - col - 1, s->pid, s->comm);
                fputs(line_buf, stdout);
                /* printf(" %d/%d %lld/%lld", s->pcpu, total_pcpu,
                        jif.busy - prev_jif.busy, jif.total - prev_jif.total); */