properly handle zero length first string when doing -c

PR: 34663
MFC After: 3 days
This commit is contained in:
Alfred Perlstein 2002-03-02 10:36:37 +00:00
parent 7486111210
commit 40e8dd712c

View File

@ -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)) {