mirror of
https://github.com/sheumann/hush.git
synced 2025-01-03 00:31:16 +00:00
ash: revent one place where number() doesn't work
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
22cbfbd996
commit
7218af9f83
@ -6400,7 +6400,7 @@ varvalue(char *name, int varflags, int flags, struct strlist *var_str_list)
|
|||||||
case '7':
|
case '7':
|
||||||
case '8':
|
case '8':
|
||||||
case '9':
|
case '9':
|
||||||
num = number(name);
|
num = atoi(name); /* number(name) fails on ${var#str} etc */
|
||||||
if (num < 0 || num > shellparam.nparam)
|
if (num < 0 || num > shellparam.nparam)
|
||||||
return -1;
|
return -1;
|
||||||
p = num ? shellparam.p[num - 1] : arg0;
|
p = num ? shellparam.p[num - 1] : arg0;
|
||||||
|
Loading…
Reference in New Issue
Block a user