Fix infinite loop bug. (Oh boy!)
authorMarc Fiuczynski <mef@cs.princeton.edu>
Thu, 18 Jan 2007 15:55:24 +0000 (15:55 +0000)
committerMarc Fiuczynski <mef@cs.princeton.edu>
Thu, 18 Jan 2007 15:55:24 +0000 (15:55 +0000)
Fix argc=2 since we always just pass in the spec file as an argument.

parseSpec.c

index c2eb89d..dc70150 100644 (file)
@@ -6,7 +6,7 @@
  * Mark Huang <mlhuang@cs.princeton.edu>
  * Copyright (C) 2006 The Trustees of Princeton University
  *
- * $Id: parseSpec.c,v 1.4 2006/11/28 21:28:11 mef Exp $
+ * $Id: parseSpec.c,v 1.5 2006/11/28 22:44:31 mef Exp $
  */
 
 #include <stdio.h>
@@ -89,9 +89,11 @@ main(int argc, char *argv[])
 
            break;
          }
+         args++;
        }
        argv[1]=argv[argc-1];
        argv[2]=0;
+       argc=2;
        /* END: support to pull out --target from the args list */
 
        /* Parse common options for all rpm modes and executables */