From: Tim Waugh Date: Tue, 6 Jan 2015 09:34:20 +0000 (+0000) Subject: Fixed missing contacts when importing from vcard. X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9ca7fc78363650e91e5cd5e2a5c6d4c729a37970;p=glabels 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. --- 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) {