summaryrefslogtreecommitdiff
path: root/core/src/fxcrt/fx_basic_bstring.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fxcrt/fx_basic_bstring.cpp')
-rw-r--r--core/src/fxcrt/fx_basic_bstring.cpp2
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;