From 886eb9a865ba62a4014a272ddca83d58eaeb7260 Mon Sep 17 00:00:00 2001 From: Brad Barnhill Date: Fri, 29 Jul 2016 19:42:13 -0500 Subject: [PATCH] fix bug in index of upc-e encoding, bump version for release --- BarcodeLib/Properties/AssemblyInfo.cs | 4 ++-- BarcodeLib/Symbologies/UPCE.cs | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/BarcodeLib/Properties/AssemblyInfo.cs b/BarcodeLib/Properties/AssemblyInfo.cs index a784a77..e206b65 100644 --- a/BarcodeLib/Properties/AssemblyInfo.cs +++ b/BarcodeLib/Properties/AssemblyInfo.cs @@ -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")] diff --git a/BarcodeLib/Symbologies/UPCE.cs b/BarcodeLib/Symbologies/UPCE.cs index 4376ccf..714ecf0 100644 --- a/BarcodeLib/Symbologies/UPCE.cs +++ b/BarcodeLib/Symbologies/UPCE.cs @@ -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" }; @@ -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());