diff options
Diffstat (limited to 'sal/inc')
-rw-r--r-- | sal/inc/rtl/ustring.hxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sal/inc/rtl/ustring.hxx b/sal/inc/rtl/ustring.hxx index 2489e3c0cc1e..39ddb49f13cb 100644 --- a/sal/inc/rtl/ustring.hxx +++ b/sal/inc/rtl/ustring.hxx @@ -903,7 +903,8 @@ public: template< typename T > typename internal::ConstCharArrayDetector< T, bool >::Type startsWith( T& literal ) const { - return rtl_ustr_asciil_reverseEquals_WithLength( pData->buffer, literal, + return internal::ConstCharArrayDetector< T, void >::size - 1 <= pData->length + && rtl_ustr_asciil_reverseEquals_WithLength( pData->buffer, literal, internal::ConstCharArrayDetector< T, void >::size - 1); } |