=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/whois/whois.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- src/usr.bin/whois/whois.c 2003/06/10 22:20:54 1.27 +++ src/usr.bin/whois/whois.c 2003/09/18 22:16:15 1.28 @@ -1,4 +1,4 @@ -/* $OpenBSD: whois.c,v 1.27 2003/06/10 22:20:54 deraadt Exp $ */ +/* $OpenBSD: whois.c,v 1.28 2003/09/18 22:16:15 fgsch Exp $ */ /* * Copyright (c) 1980, 1993 @@ -39,7 +39,7 @@ #if 0 static const char sccsid[] = "@(#)whois.c 8.1 (Berkeley) 6/6/93"; #else -static const char rcsid[] = "$OpenBSD: whois.c,v 1.27 2003/06/10 22:20:54 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: whois.c,v 1.28 2003/09/18 22:16:15 fgsch Exp $"; #endif #endif /* not lint */ @@ -214,8 +214,8 @@ p = buf + len - 1; if (isspace((unsigned char)*p)) { do - *p-- = '\0'; - while (p != buf && isspace((unsigned char)*p)); + *p = '\0'; + while (p > buf && isspace((unsigned char)*--p)); } else { if ((nbuf = malloc(len + 1)) == NULL) err(1, "malloc");