]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
bugfix
authorTimo Sirainen <tss@iki.fi>
Mon, 8 Sep 2003 00:04:59 +0000 (03:04 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 8 Sep 2003 00:04:59 +0000 (03:04 +0300)
--HG--
branch : HEAD

src/lib-storage/index/index-mail-headers.c

index cd2ba8297586181d229abd89e450189adc526715..2ef79c875b8d651a0f39e0bd78331ccef7c151f8 100644 (file)
@@ -247,12 +247,16 @@ void index_mail_parse_header_init(struct index_mail *mail,
        } else {
                t_push();
                headers = sort_array(headers);
-               for (i = 0; i < size && *headers != NULL; i++) {
+               for (i = 0; i < size && *headers != NULL;) {
                        cmp = strcasecmp(*headers, data[i]->name);
                        if (cmp <= 0) {
-                               if (cmp == 0)
+                               if (cmp == 0) {
                                        data[i]->parsing = TRUE;
+                                       i++;
+                               }
                                headers++;
+                       } else {
+                               i++;
                        }
                }
                t_pop();