diff options
Diffstat (limited to 'usr.bin/tr/str.c')
-rw-r--r-- | usr.bin/tr/str.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/tr/str.c b/usr.bin/tr/str.c index 7d91e7b..151a4bd 100644 --- a/usr.bin/tr/str.c +++ b/usr.bin/tr/str.c @@ -101,10 +101,11 @@ next(s) case SET: case SET_UPPER: case SET_LOWER: - if ((s->lastch = s->set[s->cnt++]) == OOBCH) { + if ((ch = s->set[s->cnt++]) == OOBCH) { s->state = NORMAL; return (next(s)); } + s->lastch = ch; return (1); default: return (0); |