smiley 2 лет назад
Родитель
Сommit
0538d1be26
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      src/Data/Hanzi.php
  2. 1 1
      src/Data/Kanji.php

+ 1 - 1
src/Data/Hanzi.php

@@ -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
src/Data/Kanji.php

@@ -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