From c59895173854200f581fcd04c7cbcfb142efde0b Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sun, 23 Jan 2011 03:24:45 +0200 Subject: Dont assert in safe situations --- sal/rtl/source/string.c | 2 +- sal/rtl/source/ustring.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sal/rtl') 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 ) -- cgit