comparison src/dmargs.c @ 2426:bb7264ddaefd

Fix the check for --long option argument.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 21 Jan 2020 07:54:54 +0200
parents 85b6d7ce8ca5
children b7f622d39efc
comparison
equal deleted inserted replaced
2425:85b6d7ce8ca5 2426:bb7264ddaefd
47 size_t len = strlen(node->o_long); 47 size_t len = strlen(node->o_long);
48 if (strncmp(currArg, node->o_long, len) == 0 && 48 if (strncmp(currArg, node->o_long, len) == 0 &&
49 currArg[len] == '=') 49 currArg[len] == '=')
50 { 50 {
51 opt = node; 51 opt = node;
52 optArg = (&currArg[len+1] != 0) ? &currArg[len+1] : NULL; 52 optArg = (currArg[len+1] != 0) ? &currArg[len+1] : NULL;
53 break; 53 break;
54 } 54 }
55 } 55 }
56 else 56 else
57 if (!isLong && node->o_short != 0) 57 if (!isLong && node->o_short != 0)