diff --git a/ChangeLog b/ChangeLog index 3668b7786..016a0b3fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2025-11-24 Oliver Kiddle + * 54104: Src/parse.c, Src/zsh.h: fix bug with packing strings + into wordcode + * 54103: Src/builtin.c, Src/parse.c, Test/C02cond.ztst: support > and < comparisons via the test builtin diff --git a/Src/parse.c b/Src/parse.c index ab708a279..2b7f8bb59 100644 --- a/Src/parse.c +++ b/Src/parse.c @@ -446,7 +446,9 @@ ecstrcode(char *s) long cmp; for (pp = &ecstrs; (p = *pp); ) { - if (!(cmp = p->nfunc - ecnfunc) && !(cmp = (((long)p->hashval) - ((long)val))) && !(cmp = strcmp(p->str, s))) { + if (!(cmp = p->nfunc - ecnfunc) && + !(cmp = (int) (p->hashval - val)) && + !(cmp = strcmp(p->str, s))) { /* Re-use the existing string. */ return p->offs; } diff --git a/Src/zsh.h b/Src/zsh.h index b82c35aea..fb7f6165d 100644 --- a/Src/zsh.h +++ b/Src/zsh.h @@ -850,7 +850,7 @@ struct eccstr { int nfunc; /* Hash of str. */ - int hashval; + unsigned hashval; }; /*