diff options
-rw-r--r-- | usr.sbin/user/user.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/user/user.c b/usr.sbin/user/user.c index 0084d9d7cff..45cc0d95484 100644 --- a/usr.sbin/user/user.c +++ b/usr.sbin/user/user.c @@ -1,4 +1,4 @@ -/* $OpenBSD: user.c,v 1.40 2002/12/10 20:49:28 millert Exp $ */ +/* $OpenBSD: user.c,v 1.41 2003/04/03 16:03:06 millert Exp $ */ /* $NetBSD: user.c,v 1.45 2001/08/17 08:29:00 joda Exp $ */ /* @@ -513,7 +513,7 @@ append_group(char *user, int ngroups, char **groups) while (isspace(buf[cc - 1])) cc--; buf[(j = cc)] = '\0'; - if (*(colon + 1) != '\0') + if (buf[strlen(buf) - 1] != ':') strlcat(buf, ",", sizeof(buf)); cc = strlcat(buf, user, sizeof(buf)) + 1; if (cc >= sizeof(buf)) { |