Skip to content

Commit 25b139b

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

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
@@ -1237,7 +1237,7 @@ private static BitArray ToBitArray(byte[] byteArray, int prefixZeros = 0)
12371237
var byteVal = byteArray[i];
12381238
for (var j = 0; j < 8; j++)
12391239
{
1240-
bitArray[i * 8 + j + prefixZeros] = (byteVal & (1 << (7 - j))) != 0;
1240+
bitArray[(int)((uint)i * 8) + j + prefixZeros] = (byteVal & (1 << (7 - j))) != 0;
12411241
}
12421242
}
12431243
return bitArray;

0 commit comments

Comments
 (0)