properly handle zero length first string when doing -c
PR: 34663 MFC After: 3 days
This commit is contained in:
parent
7486111210
commit
40e8dd712c
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user