target/linux/*/base-files/lib/upgrade/platform.sh - wrong check for ARGC
[openwrt/openwrt.git] / target / linux / avr32 / base-files / lib / upgrade / platform.sh
index 00ad863d1bd358b3dfcaadf406dd3a6985bad2e9..403a851c092e17abc6a8ee8c8f59df4599153c4f 100755 (executable)
@@ -7,7 +7,7 @@ PART_NAME=firmware
 platform_check_image() {
        local magic="$(get_magic_long "$1")"
 
-       [ "$ARGC" -gt 1 ] && return 1
+       [ "$#" -gt 1 ] && return 1
 
        [ "$magic" != "27051956" ] && {
                echo "Invalid image type."