diff --git a/twooffive/encoder.go b/twooffive/encoder.go index 73e7748..8ad0946 100644 --- a/twooffive/encoder.go +++ b/twooffive/encoder.go @@ -45,7 +45,7 @@ var ( start: []bool{true, false, true, false}, end: []bool{true, true, false, true}, widths: map[bool]int{ - true: 2, + true: 3, false: 1, }, }, diff --git a/twooffive/encoder_test.go b/twooffive/encoder_test.go index 007e5c6..6a529e3 100644 --- a/twooffive/encoder_test.go +++ b/twooffive/encoder_test.go @@ -41,5 +41,5 @@ func Test_Encode(t *testing.T) { } testEncode(false, "12345670", "1101101011101010101110101110101011101110111010101010101110101110111010111010101011101110101010101011101110101011101110101101011") - testEncode(true, "12345670", "1010110100101011001101101001010011010011001010101010011001101101") + testEncode(true, "12345670", "10101110100010101110001110111010001010001110100011100010101010100011100011101101") }