diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-07-11 12:19:20 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-07-11 15:48:54 +0200 |
commit | a23f7ddee2a2e19009f473c1e61092a85b9dc1f4 (patch) | |
tree | e8d73fd09acd9484d529f12b815a8d7759826bcb /sal | |
parent | f6413c384f11cd7fb626163eec421aa40216ebab (diff) |
Revert "WaE: logically last test always passes"
This reverts commit 0b1f4248338ff28208b3368b66690a84a75cc480, which appears to
be a bogus fix (for a bogus warning?). Also needs adaption a la
3c598c4064cffdc2c9ff19e094594ca360779b66 "sal: work around spurious signed
overflow warnings."
Conflicts:
sal/inc/rtl/ustring.hxx
Change-Id: I7e9d94fd93a37bb10604c1895ab619a8ac2c3f43
Diffstat (limited to 'sal')
-rw-r--r-- | sal/inc/rtl/ustring.hxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sal/inc/rtl/ustring.hxx b/sal/inc/rtl/ustring.hxx index f3d224ecdb0f..427950f8f224 100644 --- a/sal/inc/rtl/ustring.hxx +++ b/sal/inc/rtl/ustring.hxx @@ -1314,7 +1314,9 @@ public: */ OUString copy( sal_Int32 beginIndex, sal_Int32 count ) const SAL_THROW(()) { - assert(beginIndex >= 0 && beginIndex <= getLength() && count >= 0); + 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 |