Skip to content

Commit e41c2b0

Browse files
committed
Bugfix for #330
Empty lines were falsely removed. (I guess the author initially wanted to remove the whitespace around the QR code. I will add a flag to suppress whitespace in another commit.)
1 parent 90990ec commit e41c2b0

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

QRCoder/ASCIIQRCode.cs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ public string[] GetLineByLineGraphic(int repeatPerModule, string darkColorString
6868
var sideLength = QrCodeData.ModuleMatrix.Count * verticalNumberOfRepeats;
6969
for (var y = 0; y < sideLength; y++)
7070
{
71-
bool emptyLine = true;
7271
var lineBuilder = new StringBuilder();
7372

7473
for (var x = 0; x < QrCodeData.ModuleMatrix.Count; x++)
@@ -79,16 +78,8 @@ public string[] GetLineByLineGraphic(int repeatPerModule, string darkColorString
7978
{
8079
lineBuilder.Append(module ? darkColorString : whiteSpaceString);
8180
}
82-
if (module)
83-
{
84-
emptyLine = false;
85-
}
8681
}
87-
if (!emptyLine)
88-
{
89-
qrCode.Add(lineBuilder.ToString());
90-
}
91-
82+
qrCode.Add(lineBuilder.ToString());
9283
}
9384
return qrCode.ToArray();
9485
}

0 commit comments

Comments
 (0)