Skip to content

Commit 27f3611

Browse files
Shane32gfoidl
andauthored
Update QRCoder/QRCodeGenerator.cs
Co-authored-by: Günther Foidl <[email protected]>
1 parent 59e32c7 commit 27f3611

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

QRCoder/QRCodeGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1231,7 +1231,7 @@ private static BitArray PlainTextToBinaryByte(string plainText, EciMode eciMode,
12311231
private static BitArray ToBitArray(byte[] byteArray, int prefixZeros = 0)
12321232
{
12331233
// new BitArray(byteArray) is not used because it reverses the bit order within each byte
1234-
var bitArray = new BitArray(byteArray.Length * 8 + prefixZeros);
1234+
var bitArray = new BitArray((int)((uint)byteArray.Length * 8) + prefixZeros);
12351235
for (var i = 0; i < byteArray.Length; i++)
12361236
{
12371237
var byteVal = byteArray[i];

0 commit comments

Comments
 (0)