diff options
Diffstat (limited to 'fxbarcode/datamatrix/BC_EncoderContext.cpp')
-rw-r--r-- | fxbarcode/datamatrix/BC_EncoderContext.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fxbarcode/datamatrix/BC_EncoderContext.cpp b/fxbarcode/datamatrix/BC_EncoderContext.cpp index fe0a497d58..d9823bffe2 100644 --- a/fxbarcode/datamatrix/BC_EncoderContext.cpp +++ b/fxbarcode/datamatrix/BC_EncoderContext.cpp @@ -33,8 +33,9 @@ CBC_EncoderContext::CBC_EncoderContext(const WideString& msg, int32_t& e) { ByteString dststr; CBC_UtilCodingConvert::UnicodeToUTF8(msg, dststr); - WideString sb; size_t c = dststr.GetLength(); + WideString sb; + sb.Reserve(c); for (size_t i = 0; i < c; i++) { wchar_t ch = static_cast<wchar_t>(dststr[i] & 0xff); if (ch == '?' && dststr[i] != '?') { |