diff options
-rw-r--r-- | sal/inc/rtl/string.hxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx index 0d90b53239d3..4e76b7410303 100644 --- a/sal/inc/rtl/string.hxx +++ b/sal/inc/rtl/string.hxx @@ -1033,8 +1033,9 @@ public: */ OString copy( sal_Int32 beginIndex, sal_Int32 count ) const SAL_THROW(()) { - assert(beginIndex >= 0 && beginIndex <= getLength() - && count >= 0 && count <= getLength() - beginIndex); + assert(beginIndex >= 0 && beginIndex <= getLength() && count >= 0 + && sal::static_int_cast<sal_uInt32>(count) <= + sal::static_int_cast<sal_uInt32>(getLength() - beginIndex)); if ( (beginIndex == 0) && (count == getLength()) ) return *this; else |