diff options
author | Bart Schaefer <barts@users.sourceforge.net> | 2001-10-24 15:58:51 +0000 |
---|---|---|
committer | Bart Schaefer <barts@users.sourceforge.net> | 2001-10-24 15:58:51 +0000 |
commit | 18e997ec52d4cfa156585419f80719516a12351b (patch) | |
tree | d9b1ed6f609b8e37fbeafdd8f67669fc9cc155ad /Src/cond.c | |
parent | 24832377d7215614fa4ff735b1b85fa94513cdf4 (diff) | |
download | zsh-18e997ec52d4cfa156585419f80719516a12351b.tar.gz zsh-18e997ec52d4cfa156585419f80719516a12351b.tar.xz zsh-18e997ec52d4cfa156585419f80719516a12351b.zip |
16038,16041,16124: Fix bad caching of patterns.
Diffstat (limited to 'Src/cond.c')
-rw-r--r-- | Src/cond.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/cond.c b/Src/cond.c index 5593097a0..b34a14be1 100644 --- a/Src/cond.c +++ b/Src/cond.c @@ -202,11 +202,11 @@ evalcond(Estate state) char *opat; int save; - right = opat = dupstring(ecrawstr(state->prog, state->pc, + right = dupstring(opat = ecrawstr(state->prog, state->pc, &htok)); if (htok) singsub(&right); - save = (state->prog->alloc != EA_HEAP && + save = (!(state->prog->flags & EF_HEAP) && !strcmp(opat, right) && pprog != dummy_patprog2); if (!(pprog = patcompile(right, (save ? PAT_ZDUP : PAT_STATIC), |