diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-01-07 12:35:20 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-01-07 12:35:20 -0800 |
commit | 5d3a4c83fc0a41b6b04d8f7022a9db3bc04ba73e (patch) | |
tree | 5ba2ac1e302dfdc7959e4591557416dfa4e6d7d2 /core/src/fxcrt/fx_basic_bstring.cpp | |
parent | a5c9431631c7305224c846e71b9c8f811c610f60 (diff) | |
download | pdfium-5d3a4c83fc0a41b6b04d8f7022a9db3bc04ba73e.tar.xz |
Merge to XFA: Finish unit test for CFX_ByteStringC class.
Original CL at https://codereview.chromium.org/808553013
TBR=brucedawson@chromium.org
Review URL: https://codereview.chromium.org/837253002
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; |