From 9b730849abf24c512a96f0ba67405ef03d2c26de Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Fri, 19 Jun 2015 12:48:33 +0100 Subject: [PATCH] Update version number for wordcode incompatibility. Fix null dereference in tie code. Add export to typeset reserved words. Note "export FOO foo=(stuff here)" still doesn't do the export: there's an ordering problem that needs fixing. --- Config/version.mk | 4 ++-- Src/builtin.c | 2 +- Src/hashtable.c | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Config/version.mk b/Config/version.mk index 1c89e9edb..6f6d1bc7d 100644 --- a/Config/version.mk +++ b/Config/version.mk @@ -27,5 +27,5 @@ # This must also serve as a shell script, so do not add spaces around the # `=' signs. -VERSION=5.0.8-dev-0 -VERSION_DATE='June 1, 2015' +VERSION=5.0.8-dev-1 +VERSION_DATE='June 19, 2015' diff --git a/Src/builtin.c b/Src/builtin.c index fb0d09150..ff382d889 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -2587,7 +2587,7 @@ bin_typeset(char *name, char **argv, LinkList assigns, Options ops, int func) */ if (*argv) joinstr = *argv; - else if (assigns) { + else if (assigns && firstnode(assigns)) { Asgment nextasg = (Asgment)firstnode(assigns); if (ASG_ARRAYP(nextasg) || ASG_VALUEP(nextasg)) { zwarnnam(name, "third argument of tie must be join character"); diff --git a/Src/hashtable.c b/Src/hashtable.c index 14c65e647..b4c83a1fa 100644 --- a/Src/hashtable.c +++ b/Src/hashtable.c @@ -1057,6 +1057,7 @@ static struct reswd reswds[] = { {{NULL, "else", 0}, ELSE}, {{NULL, "end", 0}, ZEND}, {{NULL, "esac", 0}, ESAC}, + {{NULL, "export", 0}, TYPESET}, {{NULL, "fi", 0}, FI}, {{NULL, "for", 0}, FOR}, {{NULL, "foreach", 0}, FOREACH},