summaryrefslogtreecommitdiff
path: root/fxbarcode/oned/BC_OnedEAN13Writer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxbarcode/oned/BC_OnedEAN13Writer.cpp')
-rw-r--r--fxbarcode/oned/BC_OnedEAN13Writer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/fxbarcode/oned/BC_OnedEAN13Writer.cpp b/fxbarcode/oned/BC_OnedEAN13Writer.cpp
index 0e4bab9518..6f1d957a01 100644
--- a/fxbarcode/oned/BC_OnedEAN13Writer.cpp
+++ b/fxbarcode/oned/BC_OnedEAN13Writer.cpp
@@ -109,7 +109,7 @@ uint8_t* CBC_OnedEAN13Writer::EncodeImpl(const CFX_ByteString& contents,
return nullptr;
m_iDataLenth = 13;
- int32_t firstDigit = FXSYS_atoi(contents.Mid(0, 1).c_str());
+ int32_t firstDigit = FXSYS_atoi(contents.Left(1).c_str());
int32_t parities = FIRST_DIGIT_ENCODINGS[firstDigit];
outLength = m_codeWidth;
std::unique_ptr<uint8_t, FxFreeDeleter> result(
@@ -219,7 +219,7 @@ bool CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents,
static_cast<float>(iFontSize), &affine_matrix1,
m_fontColor, FXTEXT_CLEARTYPE);
}
- tempStr = str.Mid(0, 1);
+ tempStr = str.Left(1);
iLen = tempStr.GetLength();
strWidth = multiple * 7;
strWidth = (int32_t)(strWidth * m_outputHScale);