From bf441922e6c67ef1da31dac1e460d2541020046b Mon Sep 17 00:00:00 2001 From: Keith Bostic Date: Thu, 21 Nov 1991 20:15:26 -0800 Subject: [PATCH] have to increment on octal string; bug case was fo tr '\003' '\002', occurrences of '3' in the string would get changed to '2' SCCS-vsn: usr.bin/tr/str.c 5.4 --- usr/src/usr.bin/tr/str.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/src/usr.bin/tr/str.c b/usr/src/usr.bin/tr/str.c index 8b3e2c3eb1..d9350dd3f1 100644 --- a/usr/src/usr.bin/tr/str.c +++ b/usr/src/usr.bin/tr/str.c @@ -6,7 +6,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)str.c 5.3 (Berkeley) %G%"; +static char sccsid[] = "@(#)str.c 5.4 (Berkeley) %G%"; #endif /* not lint */ #include @@ -286,9 +286,9 @@ backslash(s) if (++cnt == 3) break; } + ++s->str; if (cnt) return (val); - ++s->str; switch (ch) { case 'a': /* escape characters */ return ('\7'); -- 2.20.1