Optimize [Cc]flag case: don't repeatedly add the last character of
string2 to squeeze cset when string2 reach its EOS state.
This commit is contained in:
parent
3994bdddb8
commit
a4974abc26
@ -272,10 +272,11 @@ endloop:
|
||||
if (Cflag && !iswrune(cnt))
|
||||
continue;
|
||||
if (cmap_lookup(map, cnt) == OOBCH) {
|
||||
if (next(&s2))
|
||||
if (next(&s2)) {
|
||||
cmap_add(map, cnt, s2.lastch);
|
||||
if (sflag)
|
||||
cset_add(squeeze, s2.lastch);
|
||||
if (sflag)
|
||||
cset_add(squeeze, s2.lastch);
|
||||
}
|
||||
} else
|
||||
cmap_add(map, cnt, cnt);
|
||||
if ((s2.state == EOS || s2.state == INFINITE) &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user