diff options
author | bde <bde@FreeBSD.org> | 1995-11-28 13:18:47 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1995-11-28 13:18:47 +0000 |
commit | 4fc868ceb3f5ebe388c7df439b5b386287577427 (patch) | |
tree | 7c5e0a8b0db2097818f093ffe4f878d9a822a359 /usr.bin/tr/str.c | |
parent | 72067f66c5795c52a5dff6b756ab1436c5de8a04 (diff) | |
download | FreeBSD-src-4fc868ceb3f5ebe388c7df439b5b386287577427.zip FreeBSD-src-4fc868ceb3f5ebe388c7df439b5b386287577427.tar.gz |
Updated to BSD4.4lite2. Fixes PR836. `echo abcd | tr a-d A-BC-D' now
works.
Diffstat (limited to 'usr.bin/tr/str.c')
-rw-r--r-- | usr.bin/tr/str.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tr/str.c b/usr.bin/tr/str.c index 9675e0f..3d532cf 100644 --- a/usr.bin/tr/str.c +++ b/usr.bin/tr/str.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)str.c 8.1 (Berkeley) 6/6/93"; +static char sccsid[] = "@(#)str.c 8.2 (Berkeley) 4/28/95"; #endif /* not lint */ #include <sys/cdefs.h> @@ -241,8 +241,8 @@ genrange(s) char *savestart; savestart = s->str; - stopval = *++s->str == '\\' ? backslash(s) : *s->str; - if (stopval < s->lastch) { + stopval = *++s->str == '\\' ? backslash(s) : *s->str++; + if (stopval < (u_char)s->lastch) { s->str = savestart; return (0); } |