diff options
| author | Barton E. Schaefer <schaefer@zsh.org> | 2016-01-27 22:10:03 -0800 |
|---|---|---|
| committer | Barton E. Schaefer <schaefer@zsh.org> | 2016-01-27 22:10:38 -0800 |
| commit | 0b37b5149d2fc56221267936753362bddce2ce4a (patch) | |
| tree | 3859ecdbc7380b88cddeb455ba262e7f53fcb156 /Src/loop.c | |
| parent | 37819: zshaddhistory hook works for any history file write, even upon keyboar... (diff) | |
| download | zsh-0b37b5149d2fc56221267936753362bddce2ce4a.tar zsh-0b37b5149d2fc56221267936753362bddce2ce4a.tar.gz zsh-0b37b5149d2fc56221267936753362bddce2ce4a.tar.bz2 zsh-0b37b5149d2fc56221267936753362bddce2ce4a.tar.lz zsh-0b37b5149d2fc56221267936753362bddce2ce4a.tar.xz zsh-0b37b5149d2fc56221267936753362bddce2ce4a.tar.zst zsh-0b37b5149d2fc56221267936753362bddce2ce4a.zip | |
37804 (plus 37816): first word following "repeat" should be evaluated as math
Diffstat (limited to 'Src/loop.c')
| -rw-r--r-- | Src/loop.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Src/loop.c b/Src/loop.c index 4def9b652..19d7f733e 100644 --- a/Src/loop.c +++ b/Src/loop.c @@ -493,7 +493,9 @@ execrepeat(Estate state, UNUSED(int do_exec)) tmp = ecgetstr(state, EC_DUPTOK, &htok); if (htok) singsub(&tmp); - count = atoi(tmp); + count = mathevali(tmp); + if (errflag) + return 1; pushheap(); cmdpush(CS_REPEAT); loops++; |
