summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko2009-08-30 17:07:30 +0200
committerDenys Vlasenko2009-08-30 17:07:30 +0200
commit7218af9f83c28bc40892c6e71a3774822b7df230 (patch)
tree4399b346fb8621b9389b51436a68c7d0b2d17110
parent22cbfbd9964321ace99d1a6a31ee1ba685202c55 (diff)
downloadbusybox-7218af9f83c28bc40892c6e71a3774822b7df230.zip
busybox-7218af9f83c28bc40892c6e71a3774822b7df230.tar.gz
ash: revent one place where number() doesn't work
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--shell/ash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 5249109..bb9464a 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -6400,7 +6400,7 @@ varvalue(char *name, int varflags, int flags, struct strlist *var_str_list)
case '7':
case '8':
case '9':
- num = number(name);
+ num = atoi(name); /* number(name) fails on ${var#str} etc */
if (num < 0 || num > shellparam.nparam)
return -1;
p = num ? shellparam.p[num - 1] : arg0;