1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-01 05:16:05 +01:00

49994: Single-byte equivalence of users/22601 and workers/40891

This commit is contained in:
Bart Schaefer 2022-04-05 09:10:45 -07:00
parent 02747bbbd3
commit ebad5f8164
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2022-04-05 Bart Schaefer <schaefer@toltec-ubuntu>
* 49994: Src/glob.c: Single-byte equivalence of users/22601 and
workers/40891 for matching against zero-length strings
2022-04-05 Peter Stephenson <p.stephenson@samsung.com>
* 49989: Src/Zle/compresult.c, Src/utils.c, Src/zsh.h: Align

View file

@ -3331,7 +3331,7 @@ igetmatch(char **sp, Patprog p, int fl, int n, char *replstr,
/* Largest possible match at tail of string: *
* move forward along string until we get a match. *
* Again there's no optimisation. */
for (ioff = 0, t = s, umlen = uml; t < send;
for (ioff = 0, t = s, umlen = uml; t <= send;
ioff++, t++, umlen--) {
set_pat_start(p, t-s);
if (pattrylen(p, t, send - t, umlen, &patstralloc, ioff)) {
@ -3362,7 +3362,7 @@ igetmatch(char **sp, Patprog p, int fl, int n, char *replstr,
do {
/* loop over all matches for global substitution */
matched = 0;
for (; t < send; t++, ioff++, umlen--) {
for (; t <= send; t++, ioff++, umlen--) {
/* Find the longest match from this position. */
set_pat_start(p, t-s);
if (pattrylen(p, t, send - t, umlen, &patstralloc, ioff)) {