ash: revent one place where number() doesn't work

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2009-08-30 17:07:30 +02:00
parent 22cbfbd996
commit 7218af9f83

View File

@ -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;