* PATCH: WC_ENDs
@ 2000-02-25 15:12 Sven Wischnowsky
0 siblings, 0 replies; only message in thread
From: Sven Wischnowsky @ 2000-02-25 15:12 UTC (permalink / raw)
To: zsh-workers
Just found a bug report in one of the Debian lists. Running a function
like:
mycd() { builtin cd "$@" && echo "$PWD" }
where the cd failed caused a core dump. This makes all functions have
their WC_END code at the end to avoid that.
Bye
Sven
diff -ru ../z.old/Src/parse.c Src/parse.c
--- ../z.old/Src/parse.c Fri Feb 25 14:16:53 2000
+++ Src/parse.c Fri Feb 25 16:10:06 2000
@@ -1327,7 +1327,7 @@
if (tok == INBRACE) {
yylex();
- par_save_list(&c);
+ par_list(&c);
if (tok != OUTBRACE) {
lineno += oldlineno;
ecsoffs = sbeg;
@@ -1343,8 +1343,9 @@
ecnpats = onp;
YYERRORV(oecused);
} else
- par_save_list1(&c);
+ par_list1(&c);
+ ecadd(WCB_END());
ecbuf[p + num + 2] = ecused - num - p;
ecbuf[p + num + 3] = ecnpats;
ecbuf[p + 1] = num;
@@ -1507,7 +1508,7 @@
int c = 0;
yylex();
- par_save_list(&c);
+ par_list(&c);
if (tok != OUTBRACE) {
cmdpop();
lineno += oldlineno;
@@ -1530,6 +1531,7 @@
}
cmdpop();
+ ecadd(WCB_END());
ecbuf[p + argc + 2] = ecused - argc - p;
ecbuf[p + argc + 3] = ecnpats;
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-02-25 15:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-02-25 15:12 PATCH: WC_ENDs Sven Wischnowsky
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).