From 965e065fa09c48d48aacdc2d49cf5f95e4a1d3bd Mon Sep 17 00:00:00 2001 From: Aptivi CEO Date: Thu, 3 Oct 2024 20:55:47 +0300 Subject: [PATCH] fix - Fixed false negative card validity --- 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 --- VisualCard.Calendar/CalendarTools.cs | 5 +---- VisualCard/CardTools.cs | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/VisualCard.Calendar/CalendarTools.cs b/VisualCard.Calendar/CalendarTools.cs index b8bc981..095d4b1 100644 --- a/VisualCard.Calendar/CalendarTools.cs +++ b/VisualCard.Calendar/CalendarTools.cs @@ -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)) || diff --git a/VisualCard/CardTools.cs b/VisualCard/CardTools.cs index f8c559c..30bf23d 100644 --- a/VisualCard/CardTools.cs +++ b/VisualCard/CardTools.cs @@ -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)