diff --git a/src/Types/TypeStandard2of5.php b/src/Types/TypeStandard2of5.php index 59a5958..592f59a 100644 --- a/src/Types/TypeStandard2of5.php +++ b/src/Types/TypeStandard2of5.php @@ -26,16 +26,12 @@ public function getBarcodeData(string $code): Barcode $chr['5'] = '11101011101010'; $chr['6'] = '10111011101010'; $chr['7'] = '10101011101110'; - $chr['8'] = '10101110111010'; + $chr['8'] = '11101010111010'; $chr['9'] = '10111010111010'; if ($this->checksum) { // add checksum $code .= $this->checksum_s25($code); } - if ((strlen($code) % 2) != 0) { - // add leading zero if code-length is odd - $code = '0' . $code; - } $seq = '11011010'; for ($i = 0; $i < strlen($code); ++$i) { diff --git a/tests/verified-files/S25+-1234567890.svg b/tests/verified-files/S25+-1234567890.svg index 4271d9f..dcdc32a 100644 --- a/tests/verified-files/S25+-1234567890.svg +++ b/tests/verified-files/S25+-1234567890.svg @@ -1,73 +1,68 @@ - - 012345678905 + + 12345678905 - - - - - - - + + + + + + + - - - + + - - + + + + - - - - - - - - - + + + + + + + + - + + - - - - + + - - + + + - - + + - - + + - - - - + + + + - - - - - - - - + + + diff --git a/tests/verified-files/S25-1234567890.svg b/tests/verified-files/S25-1234567890.svg index 2a6051d..26d48c5 100644 --- a/tests/verified-files/S25-1234567890.svg +++ b/tests/verified-files/S25-1234567890.svg @@ -41,9 +41,9 @@ - - - + + +