]> granicus.if.org Git - mutt/commitdiff
Fix the improvement to address #1655.
authorNathan Dushman <nhd+mutt@andrew.cmu.edu>
Mon, 2 Aug 2004 08:03:46 +0000 (08:03 +0000)
committerNathan Dushman <nhd+mutt@andrew.cmu.edu>
Mon, 2 Aug 2004 08:03:46 +0000 (08:03 +0000)
imap/command.c

index 0a1f43ea1c727a294a8af79d681a858139e06f3e..1679c5e64e66b1513fe06192449d35c06bd2ca54 100644 (file)
@@ -468,20 +468,20 @@ static void cmd_parse_fetch (IMAP_DATA* idata, char* s)
 
   msgno = atoi (s);
   
-       if (msgno < idata->ctx->msgcount)
+  if (msgno <= idata->ctx->msgcount)
   /* see cmd_parse_expunge */
-  for (cur = 0; cur < idata->ctx->msgcount; cur++)
-  {
-    h = idata->ctx->hdrs[cur];
-    
-    if (h->active && h->index+1 == msgno)
+    for (cur = 0; cur < idata->ctx->msgcount; cur++)
     {
-      dprint (2, (debugfile, "Message UID %d updated\n", HEADER_DATA(h)->uid));
-      break;
+      h = idata->ctx->hdrs[cur];
+      
+      if (h->active && h->index+1 == msgno)
+      {
+       dprint (2, (debugfile, "Message UID %d updated\n", HEADER_DATA(h)->uid));
+       break;
+      }
+      
+      h = NULL;
     }
-
-    h = NULL;
-  }
   
   if (!h)
   {