Commit 3d266601 3d266601df7be584da838bca1f276c4ed92f3c65 by Sergey Poznyakoff

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.
1 parent 52c4656f
...@@ -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 }
......