* PATCH: glob-array indexing fix
@ 2000-06-02 10:23 Wayne Davison
0 siblings, 0 replies; only message in thread
From: Wayne Davison @ 2000-06-02 10:23 UTC (permalink / raw)
To: Zsh Workers
I just added some more array-indexing tests to the new 14array.ztst
file (which is run by "make check"). In so doing I noticed that the
glob-array indexing was not working right in my latest patch. The fix
is trivial:
Index: Src/glob.c
@@ -1435,7 +1435,7 @@
end += matchct + 1;
else if (end > matchct)
end = matchct;
- if (end -= first > 0) {
+ if ((end -= first) > 0) {
matchptr = matchbuf + matchct - first - end;
while (end-- > 0) { /* insert matches in the arg list */
insertlinknode(list, node, matchptr->name);
It's nice to know that the test suite will now catch this if it ever
breaks again. After this change, the new array code looks solid to
me.
..wayne..
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-06-02 10:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-02 10:23 PATCH: glob-array indexing fix Wayne Davison
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).