mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Issue 911 update Code 128 from Java to fix some issues
git-svn-id: https://zxing.googlecode.com/svn/trunk@1858 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
2cbef6043b
commit
de125e2ddc
|
@ -376,11 +376,14 @@ namespace zxing {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CODE_CODE_C:
|
case CODE_CODE_C:
|
||||||
// the code read in this case is the number encoded directly
|
tmpResultSStr.str(std::string());
|
||||||
|
// the code read in this case is the number encoded directly
|
||||||
if (code < 100) {
|
if (code < 100) {
|
||||||
if (code < 10)
|
if (code < 10) {
|
||||||
tmpResultSStr << '0';
|
tmpResultSStr << '0';
|
||||||
tmpResultSStr << code;
|
}
|
||||||
|
tmpResultSStr << code;
|
||||||
|
tmpResultString.append(tmpResultSStr.str());
|
||||||
} else {
|
} else {
|
||||||
if (code != CODE_STOP) {
|
if (code != CODE_STOP) {
|
||||||
lastCharacterWasPrintable = false;
|
lastCharacterWasPrintable = false;
|
||||||
|
@ -438,9 +441,6 @@ namespace zxing {
|
||||||
throw ReaderException("");
|
throw ReaderException("");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (codeSet == CODE_CODE_C)
|
|
||||||
tmpResultString.append(tmpResultSStr.str());
|
|
||||||
|
|
||||||
// Need to pull out the check digits from string
|
// Need to pull out the check digits from string
|
||||||
int resultLength = tmpResultString.length();
|
int resultLength = tmpResultString.length();
|
||||||
// Only bother if the result had at least one character, and if the checksum digit happened to
|
// Only bother if the result had at least one character, and if the checksum digit happened to
|
||||||
|
|
Loading…
Reference in a new issue