mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -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;
|
||||
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 < 10)
|
||||
tmpResultSStr << '0';
|
||||
tmpResultSStr << code;
|
||||
if (code < 10) {
|
||||
tmpResultSStr << '0';
|
||||
}
|
||||
tmpResultSStr << code;
|
||||
tmpResultString.append(tmpResultSStr.str());
|
||||
} else {
|
||||
if (code != CODE_STOP) {
|
||||
lastCharacterWasPrintable = false;
|
||||
|
@ -438,9 +441,6 @@ namespace zxing {
|
|||
throw ReaderException("");
|
||||
}
|
||||
|
||||
if (codeSet == CODE_CODE_C)
|
||||
tmpResultString.append(tmpResultSStr.str());
|
||||
|
||||
// Need to pull out the check digits from string
|
||||
int resultLength = tmpResultString.length();
|
||||
// Only bother if the result had at least one character, and if the checksum digit happened to
|
||||
|
|
Loading…
Reference in a new issue