mh: minor fix in traditional option handler
* mh/mh_getopt.c (mh_option_init): Enforce the compited minlen on each option which begins on the same letter as the sample.
Showing
1 changed file
with
2 additions
and
0 deletions
... | @@ -192,6 +192,8 @@ mh_option_init (struct mh_option *opt) | ... | @@ -192,6 +192,8 @@ mh_option_init (struct mh_option *opt) |
192 | break; | 192 | break; |
193 | } | 193 | } |
194 | while (len >= minlen && memcmp (opt[j].opt, sample, minlen) == 0); | 194 | while (len >= minlen && memcmp (opt[j].opt, sample, minlen) == 0); |
195 | else if (opt[j].opt[0] == sample[0]) | ||
196 | opt[j].match_len = minlen; | ||
195 | else | 197 | else |
196 | break; | 198 | break; |
197 | } | 199 | } | ... | ... |
-
Please register or sign in to post a comment