Skip to content

Commit

Permalink
fix - Fixed false negative card validity
Browse files Browse the repository at this point in the history
---

When there are multiple new lines, VisualCard might inadvertently look for the beginning of another vCard, which doesn't exist in this case. This fixes this bug where VC thinks that the otherwise valid vCard is "invalid."

---

Type: fix
Breaking: False
Doc Required: False
Backport Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Oct 3, 2024
1 parent b34e179 commit 965e065
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions VisualCard.Calendar/CalendarTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,7 @@ public static Parts.Calendar[] GetCalendars(StreamReader stream)

// Process the line for begin, version, and end specifiers
if (string.IsNullOrEmpty(CalendarLine))
{
if (!stream.EndOfStream)
continue;
}
continue;
else if ((!prefix.EqualsNoCase(VcardConstants._beginSpecifier) &&
!prefix.EqualsNoCase(VcardConstants._versionSpecifier) &&
!prefix.EqualsNoCase(VcardConstants._endSpecifier)) ||
Expand Down
5 changes: 1 addition & 4 deletions VisualCard/CardTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,7 @@ public static Card[] GetCards(StreamReader stream)

// Process the line for begin, version, and end specifiers
if (string.IsNullOrEmpty(CardLine))
{
if (!stream.EndOfStream)
continue;
}
continue;
else if ((!prefix.EqualsNoCase(VcardConstants._beginSpecifier) &&
!prefix.EqualsNoCase(VcardConstants._versionSpecifier) &&
!prefix.EqualsNoCase(VcardConstants._endSpecifier)) || isAgent)
Expand Down

0 comments on commit 965e065

Please sign in to comment.