Skip to content

Commit

Permalink
Merge pull request #47 from JeanCollas/patch-1
Browse files Browse the repository at this point in the history
Issue with multi-line encoded pictures
  • Loading branch information
Bolorunduro Winner-Timothy committed Oct 11, 2021
2 parents 5ca5bc0 + f2233e8 commit 622b7e1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions vCardLib/Deserializers/v3Deserializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -509,13 +509,9 @@ protected override List<Photo> ParsePhotos(string[] contactDetails)
var photoStrIndex = Array.IndexOf(contactDetails, photoStr);
while (true)
{
if (photoStrIndex < contactDetails.Length)
if (++photoStrIndex < contactDetails.Length && contactDetails[photoStrIndex].StartsWith("PHOTO;"))
{
photoString += contactDetails[photoStrIndex];
photoStrIndex++;
if (photoStrIndex < contactDetails.Length &&
contactDetails[photoStrIndex].StartsWith("PHOTO;"))
break;
}
else
{
Expand Down Expand Up @@ -573,4 +569,4 @@ protected override List<Photo> ParsePhotos(string[] contactDetails)
return photoCollection;
}
}
}
}

0 comments on commit 622b7e1

Please sign in to comment.