long_index needs to be set to 0 before calling getopt
authorewt <devnull@localhost>
Fri, 23 Feb 1996 19:32:29 +0000 (19:32 +0000)
committerewt <devnull@localhost>
Fri, 23 Feb 1996 19:32:29 +0000 (19:32 +0000)
CVS patchset: 411
CVS date: 1996/02/23 19:32:29

rpm.c

diff --git a/rpm.c b/rpm.c
index b754e06..a814ffb 100755 (executable)
--- a/rpm.c
+++ b/rpm.c
@@ -247,6 +247,8 @@ int main(int argc, char ** argv) {
        exit(-1);
 
     while (1) {
+       long_index = 0;
+
        arg = getopt_long(argc, argv, "QqVyUYhpvKPfFilsagGducr:b:", options, 
                          &long_index);
        if (arg == -1) break;