aboutsummaryrefslogtreecommitdiffstats
path: root/imap.c
diff options
context:
space:
mode:
Diffstat (limited to 'imap.c')
-rw-r--r--imap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/imap.c b/imap.c
index 3226f59d..b7dae1af 100644
--- a/imap.c
+++ b/imap.c
@@ -1055,8 +1055,9 @@ static int imap_trail(int sock, struct query *ctl, int number, const char *tag)
/* UW IMAP returns "OK FETCH", Cyrus returns "OK Completed" */
if (strncmp(buf, tag, strlen(tag)) == 0) {
- t = buf + strspn(t, " \t");
- if (strncmp(t, "OK", 2))
+ t = buf + strlen(tag);
+ t += strspn(t, " \t");
+ if (strncmp(t, "OK", 2) == 0)
break;
}
}