Skip to content

Commit 27f29c3

Browse files
committed
Update
1 parent fa926af commit 27f29c3

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
@@ -937,7 +937,7 @@ private static BitArray PlainTextToBinaryByte(string plainText, EciMode eciMode,
937937
#if NET5_0_OR_GREATER
938938
// In .NET 5.0 and later, we can use stackalloc for small arrays to prevent heap allocations
939939
int count = targetEncoding.GetByteCount(plainText);
940-
Span<byte> codeBytes = count < 2000 ? stackalloc byte[count] : new byte[count];
940+
Span<byte> codeBytes = count < 3000 ? stackalloc byte[count] : new byte[count];
941941
targetEncoding.GetBytes(plainText, codeBytes);
942942
#else
943943
byte[] codeBytes;

0 commit comments

Comments
 (0)