From 9ca7fc78363650e91e5cd5e2a5c6d4c729a37970 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 6 Jan 2015 09:34:20 +0000 Subject: [PATCH] Fixed missing contacts when importing from vcard. Fixes Bug #742440. After checking for an END line, another line was read before breaking out of the loop. This could have been the BEGIN line for the next record, in which case that record will be lost. --- src/merge-vcard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/merge-vcard.c b/src/merge-vcard.c index 65540151..57e1817d 100644 --- a/src/merge-vcard.c +++ b/src/merge-vcard.c @@ -348,7 +348,7 @@ parse_next_vcard (FILE *fp) vcard = g_malloc0(size); - while (fgets(line, sizeof(line), fp) && found_end == FALSE) + while (found_end == FALSE && fgets(line, sizeof(line), fp)) { if (found_begin == TRUE) { -- 2.39.5