From c90e1be01b76aed12ef1cd77c789c842bda26ba6 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Wed, 30 Jul 2008 15:35:05 +0000 Subject: ash: bash compat: "shift $BIGNUM" is equivalent to "shift 1" --- shell/ash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shell/ash.c') diff --git a/shell/ash.c b/shell/ash.c index 1eb29eb95..3a1e1d797 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -9665,7 +9665,7 @@ shiftcmd(int argc UNUSED_PARAM, char **argv) if (argv[1]) n = number(argv[1]); if (n > shellparam.nparam) - n = shellparam.nparam; + n = 0; /* bash compat, was = shellparam.nparam; */ INT_OFF; shellparam.nparam -= n; for (ap1 = shellparam.p; --n >= 0; ap1++) { -- cgit v1.2.3