aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-format.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/mail-format.c')
-rw-r--r--mail/mail-format.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/mail/mail-format.c b/mail/mail-format.c
index 68b51e8265..74ffc99a22 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -1146,7 +1146,8 @@ struct {
{ "begin ", try_uudecoding },
{ "(This file must be converted with BinHex 4.0)\n", try_inline_binhex }
};
-#define NSPECIALS (sizeof (text_specials) / sizeof (*text_specials))
+
+static int num_specials = (sizeof (text_specials) / sizeof (text_specials[0]));
static void
write_one_text_plain_chunk (const char *text, int len, GtkHTML *html, GtkHTMLStream *stream, gboolean printing)
@@ -1200,12 +1201,12 @@ handle_text_plain (CamelMimePart *part, const char *mime_type,
p = text;
while (p && check_specials) {
/* Look for special cases. */
- for (i = 0; i < NSPECIALS; i++) {
+ for (i = 0; i < num_specials; i++) {
start = strstr (p, text_specials[i].start);
if (start && (start == p || start[-1] == '\n'))
break;
}
- if (!start)
+ if (i == num_specials)
break;
/* Deal with special case */