Skip to content

Commit 52f3453

Browse files
authored
Merge pull request #161 from Bernhard-Krop/standard-2-of-5
Fixing barcode type "Standard 2 of 5"
2 parents 7b053ad + 326113c commit 52f3453

File tree

3 files changed

+45
-54
lines changed

3 files changed

+45
-54
lines changed

src/Types/TypeStandard2of5.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,12 @@ public function getBarcodeData(string $code): Barcode
2626
$chr['5'] = '11101011101010';
2727
$chr['6'] = '10111011101010';
2828
$chr['7'] = '10101011101110';
29-
$chr['8'] = '10101110111010';
29+
$chr['8'] = '11101010111010';
3030
$chr['9'] = '10111010111010';
3131
if ($this->checksum) {
3232
// add checksum
3333
$code .= $this->checksum_s25($code);
3434
}
35-
if ((strlen($code) % 2) != 0) {
36-
// add leading zero if code-length is odd
37-
$code = '0' . $code;
38-
}
3935
$seq = '11011010';
4036

4137
for ($i = 0; $i < strlen($code); ++$i) {
+41-46
Loading

tests/verified-files/S25-1234567890.svg

+3-3
Loading

0 commit comments

Comments
 (0)