diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-02-09 02:03:29 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-02-09 02:03:29 +0000 |
commit | 41d19a83e21012f3389661055540712ca5ce9ebd (patch) | |
tree | bf35ba3501c0f4accfa17c4bf58d2b3b7c90921a | |
parent | 1d64a5472959f13641b9f00318618b072567bbdd (diff) |
fix "no characters" input case; tim@robbins.dropbear.id.au
-rw-r--r-- | usr.bin/tr/tr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/tr/tr.c b/usr.bin/tr/tr.c index ee9e5cefe2e..9cd1d1e99be 100644 --- a/usr.bin/tr/tr.c +++ b/usr.bin/tr/tr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tr.c,v 1.6 2001/11/19 19:02:17 mpech Exp $ */ +/* $OpenBSD: tr.c,v 1.7 2002/02/09 02:03:28 deraadt Exp $ */ /* $NetBSD: tr.c,v 1.5 1995/08/31 22:13:48 jtc Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)tr.c 8.2 (Berkeley) 5/4/95"; #endif -static char rcsid[] = "$OpenBSD: tr.c,v 1.6 2001/11/19 19:02:17 mpech Exp $"; +static char rcsid[] = "$OpenBSD: tr.c,v 1.7 2002/02/09 02:03:28 deraadt Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -209,6 +209,7 @@ main(argc, argv) errx(1, "empty string2"); /* If string2 runs out of characters, use the last one specified. */ + ch = s2.lastch; if (sflag) while (next(&s1)) { string1[s1.lastch] = ch = s2.lastch; |