summaryrefslogtreecommitdiffstats
path: root/bin/sh/arith_yylex.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/sh/arith_yylex.c')
-rw-r--r--bin/sh/arith_yylex.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/sh/arith_yylex.c b/bin/sh/arith_yylex.c
index f6eebdb..ad08184 100644
--- a/bin/sh/arith_yylex.c
+++ b/bin/sh/arith_yylex.c
@@ -218,9 +218,13 @@ checkeqcur:
value += ARITH_REM - '%';
goto checkeq;
case '+':
+ if (buf[1] == '+')
+ return ARITH_BAD;
value += ARITH_ADD - '+';
goto checkeq;
case '-':
+ if (buf[1] == '-')
+ return ARITH_BAD;
value += ARITH_SUB - '-';
goto checkeq;
case '~':
OpenPOWER on IntegriCloud