Skip to content

Commit

Permalink
Apply code suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane32 committed May 11, 2024
1 parent 132def2 commit d5e2712
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions QRCoder/QRCodeGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ private static QRCodeData GenerateQrCode(BitArray bitArray, ECCLevel eccLevel, i
for (var i = 0; i < Math.Max(eccInfo.CodewordsInGroup1, eccInfo.CodewordsInGroup2); i++)
{
foreach (var codeBlock in codeWordWithECC)
if (codeBlock.CodeWordsLength / 8 > i)
if ((uint)codeBlock.CodeWordsLength / 8 > i)
interleavedLength += 8;
}
for (var i = 0; i < eccInfo.ECCPerBlock; i++)
Expand All @@ -252,7 +252,7 @@ private static QRCodeData GenerateQrCode(BitArray bitArray, ECCLevel eccLevel, i
{
foreach (var codeBlock in codeWordWithECC)
{
if (codeBlock.CodeWordsLength / 8 > i)
if ((uint)codeBlock.CodeWordsLength / 8 > i)
pos = bitArray.CopyTo(interleavedData, (int)((uint)i * 8) + codeBlock.CodeWordsOffset, pos, 8);
}
}
Expand Down

0 comments on commit d5e2712

Please sign in to comment.