]> granicus.if.org Git - mutt/commitdiff
Try fixing a possible segmentation fault. I'm not entirely sure how
authorThomas Roessler <roessler@does-not-exist.org>
Tue, 14 Nov 2000 16:56:42 +0000 (16:56 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Tue, 14 Nov 2000 16:56:42 +0000 (16:56 +0000)
I produced it, but it's at least obvious where it happened.

curs_main.c

index 902a663ebf293d6f3d947db331240fff25c8df85..2bb2cd67f34fd86581090167cc6a6b2d088d9244 100644 (file)
@@ -439,7 +439,7 @@ int mutt_index_menu (void)
       imap_allow_reopen (Context);
 #endif
     
-      index_hint = (Context->vcount && menu->current < Context->vcount) ? CURHDR->index : 0;
+      index_hint = (Context->vcount && menu->current >= 0 && menu->current < Context->vcount) ? CURHDR->index : 0;
 
       if ((check = mx_check_mailbox (Context, &index_hint, 0)) < 0)
       {