1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-03 10:21:46 +02:00

23313: fix test for incorrect version in ZWC file

This commit is contained in:
Peter Stephenson 2007-04-23 17:09:12 +00:00
parent 3db1a442a4
commit d296535d38
2 changed files with 6 additions and 2 deletions

View file

@ -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.

View file

@ -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