]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Fixed "no extension shrinking" code to work correctly.
authorTimo Sirainen <tss@iki.fi>
Sat, 25 Oct 2008 13:32:53 +0000 (16:32 +0300)
committerTimo Sirainen <tss@iki.fi>
Sat, 25 Oct 2008 13:32:53 +0000 (16:32 +0300)
--HG--
branch : HEAD

src/lib-index/mail-index-sync-ext.c

index 81f533606453a2a0ef509e5b454de4874d474c73..66f36f05997c65558399942c4924f79f1a14b30f 100644 (file)
@@ -276,8 +276,9 @@ sync_ext_resize(const struct mail_transaction_ext_intro *u,
 
        if (new_size < old_size) {
                /* header shrank */
-               if (!no_shrink) {
+               if (no_shrink)
                        new_size = old_size;
+               else {
                        buffer_delete(map->hdr_copy_buf,
                                      ext->hdr_offset + new_size,
                                      old_size - new_size);