diff options
author | Milan Crha <mcrha@redhat.com> | 2011-02-21 20:19:36 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2011-02-21 20:19:36 +0800 |
commit | 065755c13c934634aeee08477ae4ed6a7d4a816e (patch) | |
tree | 3012c610cfad5679bbdbae55d7d5385422e6e371 /em-format | |
parent | 246851b3333f878e37505df28d01e62cecaf331d (diff) | |
download | gsoc2013-evolution-065755c13c934634aeee08477ae4ed6a7d4a816e.tar gsoc2013-evolution-065755c13c934634aeee08477ae4ed6a7d4a816e.tar.gz gsoc2013-evolution-065755c13c934634aeee08477ae4ed6a7d4a816e.tar.bz2 gsoc2013-evolution-065755c13c934634aeee08477ae4ed6a7d4a816e.tar.lz gsoc2013-evolution-065755c13c934634aeee08477ae4ed6a7d4a816e.tar.xz gsoc2013-evolution-065755c13c934634aeee08477ae4ed6a7d4a816e.tar.zst gsoc2013-evolution-065755c13c934634aeee08477ae4ed6a7d4a816e.zip |
Bug #640829 - Can drop text/plain message lines in message preview
Diffstat (limited to 'em-format')
-rw-r--r-- | em-format/em-inline-filter.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/em-format/em-inline-filter.c b/em-format/em-inline-filter.c index 23e5a6f6ed..117ddb5366 100644 --- a/em-format/em-inline-filter.c +++ b/em-format/em-inline-filter.c @@ -198,6 +198,7 @@ inline_filter_scan (CamelMimeFilter *f, gchar *in, gsize len, gint final) while (inptr < inend) { gint rest_len; + gboolean set_null_byte = FALSE; start = inptr; @@ -213,10 +214,12 @@ inline_filter_scan (CamelMimeFilter *f, gchar *in, gsize len, gint final) } rest_len = inend - start; - if (inptr < inend) + if (inptr < inend) { *inptr++ = 0; + set_null_byte = TRUE; + } - #define restore_inptr() G_STMT_START { if (inptr < inend) inptr[-1] = '\n'; } G_STMT_END + #define restore_inptr() G_STMT_START { if (set_null_byte) inptr[-1] = '\n'; } G_STMT_END switch (emif->state) { case EMIF_PLAIN: |