This commit is contained in:
smiley
2023-03-02 23:55:26 +01:00
parent 8e988764b3
commit 0538d1be26
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -171,7 +171,7 @@ final class Hanzi extends QRDataModeAbstract{
while($length > 0){
// Each 13 bits encodes a 2-byte character
$twoBytes = $bitBuffer->read(13);
$assembledTwoBytes = (($twoBytes / 0x060) << 8) | ($twoBytes % 0x060);
$assembledTwoBytes = (((int)($twoBytes / 0x060)) << 8) | ($twoBytes % 0x060);
$assembledTwoBytes += ($assembledTwoBytes < 0x00a00) // 0x003BF
? 0x0a1a1 // In the 0xA1A1 to 0xAAFE range
+1 -1
View File
@@ -168,7 +168,7 @@ final class Kanji extends QRDataModeAbstract{
while($length > 0){
// Each 13 bits encodes a 2-byte character
$twoBytes = $bitBuffer->read(13);
$assembledTwoBytes = ((int)($twoBytes / 0x0c0) << 8) | ($twoBytes % 0x0c0);
$assembledTwoBytes = (((int)($twoBytes / 0x0c0)) << 8) | ($twoBytes % 0x0c0);
$assembledTwoBytes += ($assembledTwoBytes < 0x01f00)
? 0x08140 // In the 0x8140 to 0x9FFC range