From 7218af9f83c28bc40892c6e71a3774822b7df230 Mon Sep 17 00:00:00 2001
From: Denys Vlasenko <vda.linux@googlemail.com>
Date: Sun, 30 Aug 2009 17:07:30 +0200
Subject: ash: revent one place where number() doesn't work

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
---
 shell/ash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'shell')

diff --git a/shell/ash.c b/shell/ash.c
index 524910950..bb9464af9 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;
-- 
cgit v1.2.3