Fix using "P" command on empty pattern space. If the "P" command is
used once on a non-empty pattern space and then again on an empty pattern space, the second usage restores the pattern space length to the length that it had when the first "P" was used. PR: bin/96052 Submitted by: Andrey Zholos <aaz@althenia.net> MFC after: 7 days
This commit is contained in:
parent
5a890aac57
commit
85184b8b23
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=158989
@ -188,8 +188,7 @@ process(void)
|
||||
case 'P':
|
||||
if (pd)
|
||||
break;
|
||||
if (psl != 0 &&
|
||||
(p = memchr(ps, '\n', psl)) != NULL) {
|
||||
if ((p = memchr(ps, '\n', psl)) != NULL) {
|
||||
oldpsl = psl;
|
||||
psl = p - ps;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user