mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Fix for shift handling
git-svn-id: https://zxing.googlecode.com/svn/trunk@1660 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
7c8cebfc38
commit
207b5e294d
|
@ -361,7 +361,7 @@ public final class Code128Reader extends OneDReader {
|
|||
break;
|
||||
case CODE_SHIFT:
|
||||
isNextShifted = true;
|
||||
codeSet = CODE_CODE_C;
|
||||
codeSet = CODE_CODE_A;
|
||||
break;
|
||||
case CODE_CODE_A:
|
||||
codeSet = CODE_CODE_A;
|
||||
|
@ -405,17 +405,7 @@ public final class Code128Reader extends OneDReader {
|
|||
|
||||
// Unshift back to another code set if we were shifted
|
||||
if (unshift) {
|
||||
switch (codeSet) {
|
||||
case CODE_CODE_A:
|
||||
codeSet = CODE_CODE_C;
|
||||
break;
|
||||
case CODE_CODE_B:
|
||||
codeSet = CODE_CODE_A;
|
||||
break;
|
||||
case CODE_CODE_C:
|
||||
codeSet = CODE_CODE_B;
|
||||
break;
|
||||
}
|
||||
codeSet = codeSet == CODE_CODE_A ? CODE_CODE_B : CODE_CODE_A;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue