aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/message-tag-followup.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/mail/message-tag-followup.c b/mail/message-tag-followup.c
index f546a6745d..2d855c7d7b 100644
--- a/mail/message-tag-followup.c
+++ b/mail/message-tag-followup.c
@@ -187,19 +187,23 @@ message_tag_followup_decode (const char *value)
{
struct _FollowUpTag *tag;
const char *inptr;
- int i;
+ int len, i;
tag = g_new (struct _FollowUpTag, 1);
+ inptr = strchr (value, ':');
+ if (!inptr)
+ inptr = value + strlen (value);
+
+ len = inptr - value;
+
for (i = 0; i < FOLLOWUP_FLAG_NONE; i++) {
- if (!strcmp (value, available_flags[i].name))
+ if (!strncmp (value, available_flags[i].name, len))
break;
}
tag->type = i;
- inptr = value + strlen (available_flags[i].name);
-
if (*inptr == ':') {
inptr++;
tag->target_date = strtoul (inptr, (char **) &inptr, 16);