From: Tim Waugh Date: Tue, 6 Jan 2015 09:34:20 +0000 (+0000) Subject: Fixed missing contacts when importing from vcard. X-Git-Tag: glabels-3_4_0~107 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1dd1d6e1697373140eea0373beb195c0ca4534c0;hp=42d630343f0da1ef616b6252e352e1602832e088;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) {