From: Chet Ramey Date: Mon, 5 Aug 2013 13:56:22 +0000 (-0400) Subject: commit bash-20130727 snapshot X-Git-Tag: bash-4.4-alpha~136 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50ee0e97092c9ce433819f6bb0319272f38e8476;p=thirdparty%2Fbash.git commit bash-20130727 snapshot --- diff --git a/builtins/fc.def b/builtins/fc.def index 195836844..6394a6294 100644 --- a/builtins/fc.def +++ b/builtins/fc.def @@ -475,7 +475,7 @@ fc_gethnum (command, hlist) HIST_ENTRY **hlist; { int sign, n, clen, rh; - register int i, j, last_hist; + register int i, j, last_hist, real_last; register char *s; sign = 1; @@ -503,6 +503,7 @@ fc_gethnum (command, hlist) if (last_hist < 0) return (-1); + real_last = i; i = last_hist; /* No specification defaults to most recent command. */ diff --git a/tests/RUN-ONE-TEST b/tests/RUN-ONE-TEST index 72ec06a2c..3efcf32d6 100755 --- a/tests/RUN-ONE-TEST +++ b/tests/RUN-ONE-TEST @@ -1,4 +1,4 @@ -BUILD_DIR=/usr/local/build/bash/bash-current +BUILD_DIR=/usr/local/build/chet/bash/bash-current THIS_SH=$BUILD_DIR/bash PATH=$PATH:$BUILD_DIR diff --git a/tests/array.right b/tests/array.right index 4bcd29af0..593ab3794 100644 --- a/tests/array.right +++ b/tests/array.right @@ -375,6 +375,8 @@ declare -a x='([0]="0" [1]="1" [2]="2" [3]="3" [4]="4" [5]="5foo")' declare -a x='([0]="0" [1]="1" [2]="2" [3]="3" [4]="4" [5]="5")' declare -a x='([0]="0" [1]="1" [2]="2" [3]="3" [4]="4four" [5]="5")' strlen(4four) = 5 +1 2 xx 3 1 2 0 3 +1 2 xx 3 1 2 0 3 -1 2 0 3 +1 2 xx 3