diff options
| author | Barton E. Schaefer <schaefer@zsh.org> | 2015-09-27 23:56:38 -0700 |
|---|---|---|
| committer | Barton E. Schaefer <schaefer@zsh.org> | 2015-09-27 23:56:38 -0700 |
| commit | 4bed2cf256cf79f8e17093d54a67f75dfa54794a (patch) | |
| tree | f5063f9d4ec33038b89b7fa885850d2ccb724512 /Src/lex.c | |
| parent | unposted: Update link to my ChangeLog generator script, (diff) | |
| download | zsh-4bed2cf256cf79f8e17093d54a67f75dfa54794a.tar zsh-4bed2cf256cf79f8e17093d54a67f75dfa54794a.tar.gz zsh-4bed2cf256cf79f8e17093d54a67f75dfa54794a.tar.bz2 zsh-4bed2cf256cf79f8e17093d54a67f75dfa54794a.tar.lz zsh-4bed2cf256cf79f8e17093d54a67f75dfa54794a.tar.xz zsh-4bed2cf256cf79f8e17093d54a67f75dfa54794a.tar.zst zsh-4bed2cf256cf79f8e17093d54a67f75dfa54794a.zip | |
36669: fix ${(z)...} of an an incomplete math expression by restoring "((" at the front of the token
Diffstat (limited to 'Src/lex.c')
| -rw-r--r-- | Src/lex.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -783,6 +783,15 @@ gettok(void) */ tokstr = NULL; return INPAR; + + case CMD_OR_MATH_ERR: + /* + * LEXFLAGS_ACTIVE means we came from bufferwords(), + * so we treat as an incomplete math expression + */ + if (lexflags & LEXFLAGS_ACTIVE) + tokstr = dyncat("((", tokstr ? tokstr : ""); + /* fall through */ default: return LEXERR; |
