diff --git a/VisualCard/Converters/AndroidContactsDb.cs b/VisualCard/Converters/AndroidContactsDb.cs index 0f25662..c89fbd0 100644 --- a/VisualCard/Converters/AndroidContactsDb.cs +++ b/VisualCard/Converters/AndroidContactsDb.cs @@ -657,7 +657,7 @@ ORDER BY photoBlock.Append("\n "); } } - masterContactBuilder.AppendLine($"{_photoSpecifierWithType}ENCODING=BLOB;JPEG:{photoBlock}"); + masterContactBuilder.AppendLine($"{_photoSpecifierWithType}ENCODING=BLOB;TYPE=JPEG:{photoBlock}"); break; } diff --git a/VisualCard/Parts/LogoInfo.cs b/VisualCard/Parts/LogoInfo.cs index 5ff2d15..ee133a7 100644 --- a/VisualCard/Parts/LogoInfo.cs +++ b/VisualCard/Parts/LogoInfo.cs @@ -221,7 +221,7 @@ internal static LogoInfo FromStringVcardThreeWithType(string value, StreamReader // Get the value string logoValue = value.Substring(VcardConstants._logoSpecifier.Length + 1); string[] splitLogo = logoValue.Split(VcardConstants._argumentDelimiter); - if (splitLogo.Length >= 2) + if (splitLogo.Length < 2) throw new InvalidDataException("Logo field must specify exactly two values (Type and arguments, and logo information)"); // Check to see if the value is prepended by the VALUE= argument @@ -260,7 +260,7 @@ internal static LogoInfo FromStringVcardFourWithType(string value, List // Get the value string logoValue = value.Substring(VcardConstants._logoSpecifier.Length + 1); string[] splitLogo = logoValue.Split(VcardConstants._argumentDelimiter); - if (splitLogo.Length >= 2) + if (splitLogo.Length < 2) throw new InvalidDataException("Logo field must specify exactly two values (Type and arguments, and logo information)"); // Check to see if the value is prepended by the VALUE= argument diff --git a/VisualCard/Parts/PhotoInfo.cs b/VisualCard/Parts/PhotoInfo.cs index a471bb4..0c673ef 100644 --- a/VisualCard/Parts/PhotoInfo.cs +++ b/VisualCard/Parts/PhotoInfo.cs @@ -221,7 +221,7 @@ internal static PhotoInfo FromStringVcardThreeWithType(string value, StreamReade // Get the value string photoValue = value.Substring(VcardConstants._photoSpecifier.Length + 1); string[] splitPhoto = photoValue.Split(VcardConstants._argumentDelimiter); - if (splitPhoto.Length >= 2) + if (splitPhoto.Length < 2) throw new InvalidDataException("Photo field must specify exactly two values (Type and arguments, and photo information)"); // Check to see if the value is prepended by the VALUE= argument @@ -260,7 +260,7 @@ internal static PhotoInfo FromStringVcardFourWithType(string value, List // Get the value string photoValue = value.Substring(VcardConstants._photoSpecifier.Length + 1); string[] splitPhoto = photoValue.Split(VcardConstants._argumentDelimiter); - if (splitPhoto.Length >= 2) + if (splitPhoto.Length < 2) throw new InvalidDataException("Photo field must specify exactly two values (Type and arguments, and photo information)"); // Check to see if the value is prepended by the VALUE= argument diff --git a/VisualCard/Parts/SoundInfo.cs b/VisualCard/Parts/SoundInfo.cs index cce33d2..c324502 100644 --- a/VisualCard/Parts/SoundInfo.cs +++ b/VisualCard/Parts/SoundInfo.cs @@ -221,7 +221,7 @@ internal static SoundInfo FromStringVcardThreeWithType(string value, StreamReade // Get the value string soundValue = value.Substring(VcardConstants._soundSpecifier.Length + 1); string[] splitSound = soundValue.Split(VcardConstants._argumentDelimiter); - if (splitSound.Length >= 2) + if (splitSound.Length < 2) throw new InvalidDataException("Sound field must specify exactly two values (Type and arguments, and sound information)"); // Check to see if the value is prepended by the VALUE= argument @@ -260,7 +260,7 @@ internal static SoundInfo FromStringVcardFourWithType(string value, List // Get the value string soundValue = value.Substring(VcardConstants._soundSpecifier.Length + 1); string[] splitSound = soundValue.Split(VcardConstants._argumentDelimiter); - if (splitSound.Length >= 2) + if (splitSound.Length < 2) throw new InvalidDataException("Sound field must specify exactly two values (Type and arguments, and sound information)"); // Check to see if the value is prepended by the VALUE= argument