diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bltin/test.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/bltin/test.c b/src/bltin/test.c index 90135e1..baa91a5 100644 --- a/src/bltin/test.c +++ b/src/bltin/test.c @@ -268,9 +268,13 @@ aexpr(enum token n) static int nexpr(enum token n) { - if (n == UNOT) - return !nexpr(t_lex(++t_wp)); - return primary(n); + if (n != UNOT) + return primary(n); + + n = t_lex(t_wp + 1); + if (n != EOI) + t_wp++; + return !nexpr(n); } static int |