Mercurial > hg > th-libs
comparison th_args.c @ 636:c5ce9a4bfc3e
Fix the check for --long option argument.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 21 Jan 2020 07:54:42 +0200 |
parents | c09b068ecb32 |
children | 1763d9b26a58 |
comparison
equal
deleted
inserted
replaced
635:d191ded8a790 | 636:c5ce9a4bfc3e |
---|---|
48 size_t len = strlen(node->o_long); | 48 size_t len = strlen(node->o_long); |
49 if (strncmp(currArg, node->o_long, len) == 0 && | 49 if (strncmp(currArg, node->o_long, len) == 0 && |
50 currArg[len] == '=') | 50 currArg[len] == '=') |
51 { | 51 { |
52 opt = node; | 52 opt = node; |
53 optArg = (&currArg[len+1] != 0) ? &currArg[len+1] : NULL; | 53 optArg = (currArg[len+1] != 0) ? &currArg[len+1] : NULL; |
54 break; | 54 break; |
55 } | 55 } |
56 } | 56 } |
57 else | 57 else |
58 if (!isLong && node->o_short != 0) | 58 if (!isLong && node->o_short != 0) |