]> git.ipfire.org Git - thirdparty/pciutils.git/commitdiff
Don't crash when -s or -d is not given an argument.
authorMartin Mares <mj@ucw.cz>
Mon, 14 Feb 2000 19:29:58 +0000 (19:29 +0000)
committerMartin Mares <mj@ucw.cz>
Fri, 5 May 2006 12:10:38 +0000 (14:10 +0200)
setpci.c

index 3efd1965292c33449613f743b88341c529853de3..4aa541787caf3b60e1bfec696b6d6951163f474d 100644 (file)
--- a/setpci.c
+++ b/setpci.c
@@ -1,5 +1,5 @@
 /*
- *     $Id: setpci.c,v 1.10 1999/12/04 12:32:57 mj Exp $
+ *     $Id: setpci.c,v 1.11 2000/02/14 19:29:58 mj Exp $
  *
  *     Linux PCI Utilities -- Manipulate PCI Configuration Registers
  *
@@ -327,7 +327,7 @@ next:
            usage();
          if (c[2])
            d = (c[2] == '=') ? c+3 : c+2;
-         else if (argc)
+         else if (argc > 1)
            {
              argc--;
              argv++;