changeset 505:4d6769bd8cfb

Fix long argument parsing.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 18 Nov 2012 23:11:21 +0200
parents b0ee847a14d3
children 443228332e5b
files dmargs_int.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/dmargs_int.c	Sat Nov 17 17:17:55 2012 +0200
+++ b/dmargs_int.c	Sun Nov 18 23:11:21 2012 +0200
@@ -222,11 +222,11 @@
     (void) newArgIndex;
 
     // Long option
-    for (optN = -1, optLen = i = 0; (i < optListN) && (optN < 0); i++)
+    for (optN = -1, optLen = i = 0; i < optListN && optN < 0; i++)
         if (optList[i].optLong)
         {
             optLen = strlen(optList[i].optLong);
-            if (strncmp(currArg, optList[i].optLong, optLen) == 0)
+            if (strcmp(currArg, optList[i].optLong) == 0)
                 optN = i;
         }