Skip to content

Commit

Permalink
fix bug in index of upc-e encoding, bump version for release
Browse files Browse the repository at this point in the history
  • Loading branch information
barnhill committed Jul 30, 2016
1 parent ce0abf1 commit 886eb9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions BarcodeLib/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.20")]
[assembly: AssemblyFileVersion("1.0.0.20")]
[assembly: AssemblyVersion("1.0.0.21")]
[assembly: AssemblyFileVersion("1.0.0.21")]
3 changes: 1 addition & 2 deletions BarcodeLib/Symbologies/UPCE.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class UPCE : BarcodeCommon, IBarcode
{
private string[] EAN_CodeA = { "0001101", "0011001", "0010011", "0111101", "0100011", "0110001", "0101111", "0111011", "0110111", "0001011" };
private string[] EAN_CodeB = { "0100111", "0110011", "0011011", "0100001", "0011101", "0111001", "0000101", "0010001", "0001001", "0010111" };
private string[] EAN_CodeC = { "1110010", "1100110", "1101100", "1000010", "1011100", "1001110", "1010000", "1000100", "1001000", "1110100" };
private string[] EAN_Pattern = { "aaaaaa", "aababb", "aabbab", "aabbba", "abaabb", "abbaab", "abbbaa", "ababab", "ababba", "abbaba" };
private string[] UPCE_Code_0 = { "bbbaaa", "bbabaa", "bbaaba", "bbaaab", "babbaa", "baabba", "baaabb", "bababa", "babaab", "baabab" };
private string[] UPCE_Code_1 = { "aaabbb", "aababb", "aabbab", "aabbba", "abaabb", "abbaab", "abbbaa", "ababab", "ababba", "abbaba" };
Expand Down Expand Up @@ -94,7 +93,7 @@ private string Encode_UPCE()
//encode the data
string result = "101";

int pos = 1;
int pos = 0;
foreach (char c in pattern)
{
int i = Int32.Parse(Raw_Data[pos++].ToString());
Expand Down

0 comments on commit 886eb9a

Please sign in to comment.