From 183251d710ad2bcd28d68eb7554ef5222ff091c4 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 14 Feb 2000 19:29:58 +0000 Subject: [PATCH] Don't crash when -s or -d is not given an argument. --- setpci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setpci.c b/setpci.c index 3efd196..4aa5417 100644 --- 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++; -- 2.39.2