Skip to content

Commit d5e2712

Browse files
committed
Apply code suggestions
1 parent 132def2 commit d5e2712

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

QRCoder/QRCodeGenerator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ private static QRCodeData GenerateQrCode(BitArray bitArray, ECCLevel eccLevel, i
234234
for (var i = 0; i < Math.Max(eccInfo.CodewordsInGroup1, eccInfo.CodewordsInGroup2); i++)
235235
{
236236
foreach (var codeBlock in codeWordWithECC)
237-
if (codeBlock.CodeWordsLength / 8 > i)
237+
if ((uint)codeBlock.CodeWordsLength / 8 > i)
238238
interleavedLength += 8;
239239
}
240240
for (var i = 0; i < eccInfo.ECCPerBlock; i++)
@@ -252,7 +252,7 @@ private static QRCodeData GenerateQrCode(BitArray bitArray, ECCLevel eccLevel, i
252252
{
253253
foreach (var codeBlock in codeWordWithECC)
254254
{
255-
if (codeBlock.CodeWordsLength / 8 > i)
255+
if ((uint)codeBlock.CodeWordsLength / 8 > i)
256256
pos = bitArray.CopyTo(interleavedData, (int)((uint)i * 8) + codeBlock.CodeWordsOffset, pos, 8);
257257
}
258258
}

0 commit comments

Comments
 (0)