summaryrefslogtreecommitdiff
path: root/fxbarcode/oned/BC_OnedCode39Writer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxbarcode/oned/BC_OnedCode39Writer.cpp')
-rw-r--r--fxbarcode/oned/BC_OnedCode39Writer.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/fxbarcode/oned/BC_OnedCode39Writer.cpp b/fxbarcode/oned/BC_OnedCode39Writer.cpp
index d454985478..bcc64d83bd 100644
--- a/fxbarcode/oned/BC_OnedCode39Writer.cpp
+++ b/fxbarcode/oned/BC_OnedCode39Writer.cpp
@@ -158,7 +158,7 @@ char CBC_OnedCode39Writer::CalcCheckSum(const CFX_ByteString& contents,
int32_t& e) {
int32_t length = contents.GetLength();
if (length > 80) {
- e = BCExceptionContentsLengthShouldBetween1and80;
+ e = BCExceptionGeneric;
return '*';
}
int32_t checksum = 0;
@@ -167,16 +167,13 @@ char CBC_OnedCode39Writer::CalcCheckSum(const CFX_ByteString& contents,
int32_t j = 0;
for (; j < len; j++) {
if (ALPHABET_STRING[j] == contents[i]) {
- if (contents[i] != '*') {
+ if (contents[i] != '*')
checksum += j;
- break;
- } else {
- break;
- }
+ break;
}
}
if (j >= len) {
- e = BCExceptionUnSupportedString;
+ e = BCExceptionGeneric;
return '*';
}
}