This commit is contained in:
smiley
2023-03-11 03:31:22 +01:00
parent 4d48f4b656
commit 8e72bc6521
5 changed files with 26 additions and 18 deletions
+2 -2
View File
@@ -78,8 +78,8 @@ final class AlphaNum extends QRDataModeAbstract{
;
// encode 2 characters in 11 bits
for($i = 0; $i + 1 < $len; $i += 2){
$bitBuffer->put(self::CHAR_TO_ORD[$this->data[$i]] * 45 + self::CHAR_TO_ORD[$this->data[$i + 1]], 11);
for($i = 0; ($i + 1) < $len; $i += 2){
$bitBuffer->put((self::CHAR_TO_ORD[$this->data[$i]] * 45 + self::CHAR_TO_ORD[$this->data[($i + 1)]]), 11);
}
// encode a remaining character in 6 bits