Skip to content

Commit

Permalink
Update QRCoder/QRCodeGenerator.cs
Browse files Browse the repository at this point in the history
Co-authored-by: Günther Foidl <[email protected]>
  • Loading branch information
Shane32 and gfoidl authored May 2, 2024
1 parent 59e32c7 commit 27f3611
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion QRCoder/QRCodeGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,7 @@ private static BitArray PlainTextToBinaryByte(string plainText, EciMode eciMode,
private static BitArray ToBitArray(byte[] byteArray, int prefixZeros = 0)
{
// new BitArray(byteArray) is not used because it reverses the bit order within each byte
var bitArray = new BitArray(byteArray.Length * 8 + prefixZeros);
var bitArray = new BitArray((int)((uint)byteArray.Length * 8) + prefixZeros);
for (var i = 0; i < byteArray.Length; i++)
{
var byteVal = byteArray[i];
Expand Down

0 comments on commit 27f3611

Please sign in to comment.