PR/4805: Ty Sarna: read builtin does not remove trailing blanks.

This commit is contained in:
christos 1998-01-15 19:39:11 +00:00
parent ed81982205
commit 2708e4180f
1 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: miscbltin.c,v 1.20 1997/11/05 14:05:28 kleink Exp $ */
/* $NetBSD: miscbltin.c,v 1.21 1998/01/15 19:39:11 christos Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)miscbltin.c 8.4 (Berkeley) 5/4/95";
#else
__RCSID("$NetBSD: miscbltin.c,v 1.20 1997/11/05 14:05:28 kleink Exp $");
__RCSID("$NetBSD: miscbltin.c,v 1.21 1998/01/15 19:39:11 christos Exp $");
#endif
#endif /* not lint */
@ -154,6 +154,9 @@ readcmd(argc, argv)
}
}
STACKSTRNUL(p);
/* Remove trailing blanks */
while (strchr(ifs, *--p) != NULL)
*p = '\0';
setvar(*ap, stackblock(), 0);
while (*++ap != NULL)
setvar(*ap, nullstr, 0);