summaryrefslogtreecommitdiffstats
path: root/bin/sh/arith_yacc.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/sh/arith_yacc.c')
-rw-r--r--bin/sh/arith_yacc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/sh/arith_yacc.c b/bin/sh/arith_yacc.c
index edb321f..63f236c 100644
--- a/bin/sh/arith_yacc.c
+++ b/bin/sh/arith_yacc.c
@@ -97,6 +97,8 @@ static arith_t arith_lookupvarint(char *varname)
arith_t result;
str = lookupvar(varname);
+ if (uflag && str == NULL)
+ yyerror("variable not set");
if (str == NULL || *str == '\0')
str = "0";
errno = 0;
OpenPOWER on IntegriCloud