summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorBrendan Cully <brendan@kublai.com>2008-08-23 15:21:42 -0700
committerBrendan Cully <brendan@kublai.com>2008-08-23 15:21:42 -0700
commite3c2ce643d645b0da8f92579b66d95cd8d3d8e8a (patch)
treef274e814d247d71ed401b1a50160d7b8878ae806 /main.c
parenta69216dced82f505ba6afd5ed9ef65ba16df9248 (diff)
Fix infinite loop with "mutt -", introduced in [31c9e9727d42].
Treats - as a non-option argument. It would be reasonable to treat it as an error instead.
Diffstat (limited to 'main.c')
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index d96f46e5..ca1a3c67 100644
--- a/main.c
+++ b/main.c
@@ -582,7 +582,7 @@ int main (int argc, char **argv)
*/
for (; optind < argc; optind++)
{
- if (argv[optind][0] == '-')
+ if (argv[optind][0] == '-' && argv[optind][1] != '\0')
{
if (argv[optind][1] == '-' && argv[optind][2] == '\0')
double_dash = optind; /* quit outer loop after getopt */