about summary refs log tree commit diff
path: root/Src/parse.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2007-04-23 17:09:12 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2007-04-23 17:09:12 +0000
commitd296535d38deacd0da9ef70aa54fbe43caa1f6c8 (patch)
treee7ec7d23d6e22be186b5a3a4d82a6280d41f2437 /Src/parse.c
parent3db1a442a478ccc8e0ad59abc03f659c049971ee (diff)
downloadzsh-d296535d38deacd0da9ef70aa54fbe43caa1f6c8.tar.gz
zsh-d296535d38deacd0da9ef70aa54fbe43caa1f6c8.tar.xz
zsh-d296535d38deacd0da9ef70aa54fbe43caa1f6c8.zip
23313: fix test for incorrect version in ZWC file
Diffstat (limited to 'Src/parse.c')
-rw-r--r--Src/parse.c5
1 files changed, 3 insertions, 2 deletions
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