hdt: fix arguments parsing
authorPierre-Alexandre Meyer <pierre@mouraf.org>
Thu, 5 Nov 2009 06:46:45 +0000 (22:46 -0800)
committerErwan Velu <erwan.velu@free.fr>
Thu, 5 Nov 2009 15:33:41 +0000 (16:33 +0100)
Do not increment the argument counter in the loop after having found
the last auto= argument. It is taken care of by the for.
With it, an extra argument after the auto= string will be ignored.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
com32/hdt/hdt-common.c

index c3873dd..509aac7 100644 (file)
@@ -101,7 +101,6 @@ void detect_parameters(const int argc, const char *argv[],
                if (i<argc)  {
                        strcat(hardware->auto_label,argv[i]);
                        hardware->auto_label[strlen(hardware->auto_label)-1]=0;
-                       i++;
                }
     }
   }