Typo in cdda2wav LASTTRACK corrected.
authorJesus Climent <mooch@debian.org>
Tue, 17 Jan 2006 21:27:08 +0000 (21:27 +0000)
committerJesus Climent <mooch@debian.org>
Tue, 17 Jan 2006 21:27:08 +0000 (21:27 +0000)
LASTTRACK should be computed so that we dont get errors with invalid numerical inputs.

abcde

diff --git a/abcde b/abcde
index 05f4248..b6271fc 100755 (executable)
--- a/abcde
+++ b/abcde
@@ -2270,12 +2270,12 @@ do_cdread ()
                # the user said
                # We need the first and last track for cdda2wav
                FIRSTTRACK=$2
-               LASTTRACK=$3
+               LASTTRACK=$(expr $3 + 0)
                UTRACKNUM=$FIRSTTRACK
                case "$CDROMREADERSYNTAX" in
                        flac) READTRACKNUMS="$FIRSTTRACK.1-$(($LASTTRACK + 1)).0" ;;
                        cdparanoia) READTRACKNUMS="$FIRSTTRACK-$LASTTRACK" ;;
-                       cdda2wav) READTRACKNUMS="$FIRSTTRACK+$LASTRACK" ;;
+                       cdda2wav) READTRACKNUMS="$FIRSTTRACK+$LASTTRACK" ;;
                        *) echo "abcde error: $CDROMREADERSYNTAX does not support ONETRACK mode"
                                exit 1 ;;
                esac