Skip to content

Commit 1049cec

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

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
@@ -1104,7 +1104,7 @@ private static int GetCountIndicatorLength(int version, EncodingMode encMode)
11041104

11051105
private static int GetDataLength(EncodingMode encoding, string plainText, BitArray codedText, bool forceUtf8)
11061106
{
1107-
return forceUtf8 || IsUtf8(encoding, plainText, forceUtf8) ? (codedText.Length / 8) : plainText.Length;
1107+
return forceUtf8 || IsUtf8(encoding, plainText, forceUtf8) ? (int)((uint)codedText.Length / 8) : plainText.Length;
11081108
}
11091109

11101110
private static bool IsUtf8(EncodingMode encoding, string plainText, bool forceUtf8)

0 commit comments

Comments
 (0)