diff options
author | Tor Lillqvist <tlillqvist@novell.com> | 2011-01-23 03:24:45 +0200 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@novell.com> | 2011-01-23 03:24:45 +0200 |
commit | c59895173854200f581fcd04c7cbcfb142efde0b (patch) | |
tree | d1a20e3d04aa5b5fbe3628a5eebe84a418139fa1 /sal/rtl | |
parent | 1bff69d294c0c8311bfc439ff5e24f2c84c9195a (diff) |
Dont assert in safe situations
Diffstat (limited to 'sal/rtl')
-rw-r--r-- | sal/rtl/source/string.c | 2 | ||||
-rw-r--r-- | sal/rtl/source/ustring.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sal/rtl/source/string.c b/sal/rtl/source/string.c index 287f19aef6e5..2ee79611218a 100644 --- a/sal/rtl/source/string.c +++ b/sal/rtl/source/string.c @@ -179,7 +179,7 @@ sal_Bool SAL_CALL rtl_impl_convertUStringToString(rtl_String ** pTarget, OSL_ASSERT(pTarget != NULL && (pSource != NULL || nLength == 0) && nLength >= 0 - && rtl_isOctetTextEncoding(nEncoding)); + && (nLength == 0 || rtl_isOctetTextEncoding(nEncoding))); if ( !nLength ) rtl_string_new( pTarget ); diff --git a/sal/rtl/source/ustring.c b/sal/rtl/source/ustring.c index 317d24d88d90..2bb685992c6b 100644 --- a/sal/rtl/source/ustring.c +++ b/sal/rtl/source/ustring.c @@ -552,7 +552,7 @@ static void rtl_string2UString_status( rtl_uString** ppThis, sal_uInt32 nCvtFlags, sal_uInt32 *pInfo ) { - OSL_ENSURE(rtl_isOctetTextEncoding(eTextEncoding), + OSL_ENSURE(nLen == 0 || rtl_isOctetTextEncoding(eTextEncoding), "rtl_string2UString_status() - Wrong TextEncoding" ); if ( !nLen ) |