diff options
Diffstat (limited to 'fxbarcode')
-rw-r--r-- | fxbarcode/oned/BC_OnedCode128Writer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fxbarcode/oned/BC_OnedCode128Writer.cpp b/fxbarcode/oned/BC_OnedCode128Writer.cpp index 644933d386..95a95b69e2 100644 --- a/fxbarcode/oned/BC_OnedCode128Writer.cpp +++ b/fxbarcode/oned/BC_OnedCode128Writer.cpp @@ -195,7 +195,7 @@ int32_t CBC_OnedCode128Writer::Encode128C(const CFX_ByteString& contents, if (std::isdigit(ch)) { patternIndex = FXSYS_atoi(contents.Mid(position, 2).c_str()); ++position; - if (std::isdigit(contents[position])) + if (position < contents.GetLength() && std::isdigit(contents[position])) ++position; } else { patternIndex = static_cast<int32_t>(ch); |