diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Src/parse.c | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index 16ffa1136..bd1cd45f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2007-04-23 Peter Stephenson <pws@csr.com> + * 23313: Src/parse.c: the shell didn't actually check the version + of ZWC files anyway. + * 23312: Src/parse.c, Src/zsh.mdd: ensure parse.c is updated when version.h changes in order to pick up changes to ZWC files; memset() header of wordcode file to normalise unused words. diff --git a/Src/parse.c b/Src/parse.c index 97eb14495..e830f870f 100644 --- a/Src/parse.c +++ b/Src/parse.c @@ -2617,9 +2617,10 @@ load_dump_header(char *nam, char *name, int err) } if (read(fd, buf, (FD_PRELEN + 1) * sizeof(wordcode)) != ((FD_PRELEN + 1) * sizeof(wordcode)) || - (v = (fdmagic(buf) != FD_MAGIC && fdmagic(buf) != FD_OMAGIC))) { + (v = (fdmagic(buf) != FD_MAGIC && fdmagic(buf) != FD_OMAGIC)) || + strcmp(fdversion(buf), ZSH_VERSION)) { if (err) { - if (v) { + if (!v) { zwarnnam(nam, "zwc file has wrong version (zsh-%s): %s", fdversion(buf), name); } else |