void-packages/srcpkgs/procps/patches/top_username_parse.patch

16 lines
622 B
Diff

Description: Fixes off-by-one error so top -u username works
Bug-Debian: http://bugs.debian.org/571790
Author: Chuan-kai Lin <cklin@debian.org>
Last-Update: 2010-03-01
--- a/top.c
+++ b/top.c
@@ -1924,7 +1924,7 @@
errmsg = parse_uid(cp, &selection_uid);
if (errmsg) std_err(errmsg);
selection_type = 'u';
- cp += snprintf(Curwin->colusrnam, USRNAMSIZ-1, "%s", cp); // FIXME: junk
+ cp += snprintf(Curwin->colusrnam, USRNAMSIZ-1, "%s", cp)-1; // FIXME: junk
} while(0);
break;
case 'U':