diff options
author | alfred <alfred@FreeBSD.org> | 2002-03-02 10:36:37 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2002-03-02 10:36:37 +0000 |
commit | 4461fe46999f88bc903ba85a6b4f81a34b92edeb (patch) | |
tree | 67d33c69b5698f1ffbf9b625d7713eb7f4c890dd | |
parent | 71fa5068bb05736698cc572c3b07a35d092a87e6 (diff) | |
download | FreeBSD-src-4461fe46999f88bc903ba85a6b4f81a34b92edeb.zip FreeBSD-src-4461fe46999f88bc903ba85a6b4f81a34b92edeb.tar.gz |
properly handle zero length first string when doing -c
PR: 34663
MFC After: 3 days
-rw-r--r-- | usr.bin/tr/tr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.bin/tr/tr.c b/usr.bin/tr/tr.c index a7ed0c9..53bd265 100644 --- a/usr.bin/tr/tr.c +++ b/usr.bin/tr/tr.c @@ -212,6 +212,7 @@ main(argc, argv) if (!next(&s2)) errx(1, "empty string2"); + ch = s2.lastch; /* If string2 runs out of characters, use the last one specified. */ if (sflag) while (next(&s1)) { |