Don't shift ARGV[0] to undefined. (#466557, Aidan Delaney)
authorMatthias Clasen <mclasen@redhat.com>
Thu, 8 Nov 2007 14:57:15 +0000 (14:57 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 8 Nov 2007 14:57:15 +0000 (14:57 +0000)
2007-11-08  Matthias Clasen <mclasen@redhat.com>

        * glib-mkenums.in: Don't shift ARGV[0] to undefined.
        (#466557, Aidan Delaney)

svn path=/trunk/; revision=5827

gobject/ChangeLog
gobject/glib-mkenums.in

index 405afc1..6e6b7fd 100644 (file)
@@ -1,3 +1,8 @@
+2007-11-08  Matthias Clasen <mclasen@redhat.com>
+
+       * glib-mkenums.in: Don't shift ARGV[0] to undefined. 
+       (#466557, Aidan Delaney)
+
 2007-11-07  Matthias Clasen <mclasen@redhat.com>
 
        * === Released 2.14.3 ===
index cabb0f7..e7e00ea 100755 (executable)
@@ -215,7 +215,7 @@ sub read_template_file {
 if (!defined $ARGV[0]) {
     usage;
 }
-while ($_ = $ARGV[0], /^-/) {
+while ($_=$ARGV[0],/^-/) {
     shift;
     last if /^--$/;
     if (/^--template$/)              { read_template_file (shift); }
@@ -230,6 +230,7 @@ while ($_ = $ARGV[0], /^-/) {
     elsif (/^--help$/ || /^-h$/)     { usage; }
     elsif (/^--version$/ || /^-v$/)  { version; }
     else { usage; }
+    last if not defined($ARGV[0]);
 }
 
 # put auto-generation comment