Skip to content

Commit 59e32c7

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

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
@@ -1142,7 +1142,7 @@ private static BitArray PlainTextToBinaryNumeric(string plainText)
11421142
{
11431143
var bitArray = new BitArray(plainText.Length / 3 * 10 + (plainText.Length % 3 == 1 ? 4 : plainText.Length % 3 == 2 ? 7 : 0));
11441144
var index = 0;
1145-
for (int i = 0; (i + 2) < plainText.Length; i += 3)
1145+
for (int i = 0; i < plainText.Length - 2; i += 3)
11461146
{
11471147
#if NET5_0_OR_GREATER
11481148
var dec = int.Parse(plainText.AsSpan(i, 3), NumberStyles.None, CultureInfo.InvariantCulture);

0 commit comments

Comments
 (0)