]> granicus.if.org Git - procps-ng/commitdiff
src==dst is illegal, failing on ppc64
authoralbert <>
Wed, 9 Dec 2009 09:28:22 +0000 (09:28 +0000)
committeralbert <>
Wed, 9 Dec 2009 09:28:22 +0000 (09:28 +0000)
top.c

diff --git a/top.c b/top.c
index 6d4a7ccf09973533ff6329ab318e74041d15ae43..e384ed62c3f3a2ab88b0d287b15f21d4cc15839d 100644 (file)
--- a/top.c
+++ b/top.c
@@ -2190,7 +2190,8 @@ static void reframewins (void)
 // Value a window's name and make the associated group name.
 static void win_names (WIN_t *q, const char *name)
 {
-   sprintf(q->rc.winname, "%.*s", WINNAMSIZ -1, name);
+   if(q->rc.winname != name)  // src==dst is illegal, failing on ppc64
+      sprintf(q->rc.winname, "%.*s", WINNAMSIZ -1, name);
    sprintf(q->grpname, "%d:%.*s", q->winnum, WINNAMSIZ -1, name);
 }