summaryrefslogtreecommitdiff
path: root/bin/sh/arith_yylex.c
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@FreeBSD.org>2011-03-05 13:27:13 +0000
committerJilles Tjoelker <jilles@FreeBSD.org>2011-03-05 13:27:13 +0000
commit976018d24f7ce1e01a760e2f72e63f6e24b57861 (patch)
treebf3a5f469de7c275fad2760418405b1e77622289 /bin/sh/arith_yylex.c
parente776709347943dc65173deaec21ce5e6c301ebf4 (diff)
downloadsrc-test2-976018d24f7ce1e01a760e2f72e63f6e24b57861.tar.gz
src-test2-976018d24f7ce1e01a760e2f72e63f6e24b57861.zip
Notes
Diffstat (limited to 'bin/sh/arith_yylex.c')
-rw-r--r--bin/sh/arith_yylex.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/sh/arith_yylex.c b/bin/sh/arith_yylex.c
index 0d08a831ff0c..08e43a488b15 100644
--- a/bin/sh/arith_yylex.c
+++ b/bin/sh/arith_yylex.c
@@ -57,6 +57,7 @@ yylex()
{
int value;
const char *buf = arith_buf;
+ char *end;
const char *p;
for (;;) {
@@ -79,7 +80,8 @@ yylex()
case '7':
case '8':
case '9':
- yylval.val = strtoarith_t(buf, (char **)&arith_buf, 0);
+ yylval.val = strtoarith_t(buf, (char **)&end, 0);
+ arith_buf = end;
return ARITH_NUM;
case 'A':
case 'B':