diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-01-07 12:31:41 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-01-07 12:31:41 -0800 |
commit | 310d26aadffd2f3141b683f40010109a455b403a (patch) | |
tree | 723b4aa48247af51a6caed52958e41350499a36e /core/src/fxcrt/fx_basic_bstring.cpp | |
parent | 948095edfc04f35a69f15cd7d9926844ee0ac624 (diff) | |
download | pdfium-310d26aadffd2f3141b683f40010109a455b403a.tar.xz |
Finish unit test for CFX_ByteStringC class.
This fixes a few cut-n-paste errors in the previous version, plus
adds more corner cases. The implementation is fixed to handle a
few of these that failed.
R=brucedawson@chromium.org
Review URL: https://codereview.chromium.org/808553013
Diffstat (limited to 'core/src/fxcrt/fx_basic_bstring.cpp')
-rw-r--r-- | core/src/fxcrt/fx_basic_bstring.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/fxcrt/fx_basic_bstring.cpp b/core/src/fxcrt/fx_basic_bstring.cpp index c54148d799..0d4f860b32 100644 --- a/core/src/fxcrt/fx_basic_bstring.cpp +++ b/core/src/fxcrt/fx_basic_bstring.cpp @@ -1082,7 +1082,7 @@ FX_DWORD CFX_ByteStringC::GetID(FX_STRSIZE start_pos) const if (m_Length == 0) { return 0; } - if (start_pos >= m_Length) { + if (start_pos < 0 || start_pos >= m_Length) { return 0; } FX_DWORD strid = 0; |