From ee5948c15bbf6c44ec445ce25942367b30bdafa9 Mon Sep 17 00:00:00 2001 From: RamonaFrickCH <105198572+RamonaFrickCH@users.noreply.github.com> Date: Mon, 25 Jul 2022 14:31:04 +0200 Subject: [PATCH] Bugfixing # 399 Bug #399 If BillInformation is empty, insert no linebreak --- QRCoder/PayloadGenerator.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/QRCoder/PayloadGenerator.cs b/QRCoder/PayloadGenerator.cs index 6275e5be..9959747e 100644 --- a/QRCoder/PayloadGenerator.cs +++ b/QRCoder/PayloadGenerator.cs @@ -1139,7 +1139,8 @@ public override string ToString() //AddInf "logical" element SwissQrCodePayload += (!string.IsNullOrEmpty(additionalInformation.UnstructureMessage) ? additionalInformation.UnstructureMessage : string.Empty) + br; //Ustrd SwissQrCodePayload += additionalInformation.Trailer + br; //Trailer - SwissQrCodePayload += (!string.IsNullOrEmpty(additionalInformation.BillInformation) ? additionalInformation.BillInformation : string.Empty) + br; //StrdBkgInf + // Bug #399 If BillInformation is empty, insert no linebreak + SwissQrCodePayload += (!string.IsNullOrEmpty(additionalInformation.BillInformation) ? additionalInformation.BillInformation + br : string.Empty); //StrdBkgInf //AltPmtInf "logical" element if (!string.IsNullOrEmpty(alternativeProcedure1))