Fix off by one in `y' (transliterate) command which caused the last character
of the pattern space not to be examined. Noticed by: Motoyuki Konno <motoyuki@bsdclub.org>
This commit is contained in:
@@ -244,7 +244,7 @@ process()
|
||||
case 'y':
|
||||
if (pd || psl == 0)
|
||||
break;
|
||||
for (p = ps, len = psl; --len; ++p)
|
||||
for (p = ps, len = psl; len--; ++p)
|
||||
*p = cp->u.y[(unsigned char)*p];
|
||||
break;
|
||||
case ':':
|
||||
|
||||
Reference in New Issue
Block a user