Skip to content

Commit

Permalink
Bugfix for #330
Browse files Browse the repository at this point in the history
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.)
  • Loading branch information
codebude committed Nov 8, 2021
1 parent 90990ec commit e41c2b0
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions QRCoder/ASCIIQRCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ public string[] GetLineByLineGraphic(int repeatPerModule, string darkColorString
var sideLength = QrCodeData.ModuleMatrix.Count * verticalNumberOfRepeats;
for (var y = 0; y < sideLength; y++)
{
bool emptyLine = true;
var lineBuilder = new StringBuilder();

for (var x = 0; x < QrCodeData.ModuleMatrix.Count; x++)
Expand All @@ -79,16 +78,8 @@ public string[] GetLineByLineGraphic(int repeatPerModule, string darkColorString
{
lineBuilder.Append(module ? darkColorString : whiteSpaceString);
}
if (module)
{
emptyLine = false;
}
}
if (!emptyLine)
{
qrCode.Add(lineBuilder.ToString());
}

qrCode.Add(lineBuilder.ToString());
}
return qrCode.ToArray();
}
Expand Down

0 comments on commit e41c2b0

Please sign in to comment.