summaryrefslogtreecommitdiff
path: root/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxbarcode/datamatrix/BC_HighLevelEncoder.cpp')
-rw-r--r--fxbarcode/datamatrix/BC_HighLevelEncoder.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp b/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
index ec527d29a8..6034173ee4 100644
--- a/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
+++ b/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
@@ -76,13 +76,12 @@ CFX_WideString CBC_HighLevelEncoder::encodeHighLevel(CFX_WideString msg,
return CFX_WideString();
context.setAllowRectangular(allowRectangular);
- if ((msg.Mid(0, 6) == MACRO_05_HEADER) &&
- (msg.Mid(msg.GetLength() - 1, 1) == MACRO_TRAILER)) {
+ if ((msg.Left(6) == MACRO_05_HEADER) && (msg.Right(1) == MACRO_TRAILER)) {
context.writeCodeword(MACRO_05);
context.setSkipAtEnd(2);
context.m_pos += 6;
- } else if ((msg.Mid(0, 6) == MACRO_06_HEADER) &&
- (msg.Mid(msg.GetLength() - 1, 1) == MACRO_TRAILER)) {
+ } else if ((msg.Left(6) == MACRO_06_HEADER) &&
+ (msg.Right(1) == MACRO_TRAILER)) {
context.writeCodeword(MACRO_06);
context.setSkipAtEnd(2);
context.m_pos += 6;