Fix BASH_ARGC and BASH_ARGV offsets some more.
authorZac Medico <zmedico@gentoo.org>
Sun, 6 Apr 2008 21:44:18 +0000 (21:44 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 6 Apr 2008 21:44:18 +0000 (21:44 -0000)
svn path=/main/trunk/; revision=9734

bin/isolated-functions.sh

index 28653faf93c19859e4316b38aace3bbad7d13cff..737c5dfb4b069679ec05e7320540613c76829e08 100755 (executable)
@@ -26,8 +26,8 @@ dump_trace() {
        (( p = ${#BASH_ARGV[@]} ))
        while (( n > 0 )) ; do
                [ "${FUNCNAME[${n}]}" == "qa_call" ] && break
+               (( p -= ${BASH_ARGC[${n}]} ))
                (( n-- ))
-               (( p -= ${BASH_ARGC[${n} - 1]} ))
        done
        if (( n == 0 )) ; then
                (( n = ${#FUNCNAME[@]} - 1 ))