summaryrefslogtreecommitdiff
path: root/sal/rtl
diff options
context:
space:
mode:
Diffstat (limited to 'sal/rtl')
-rw-r--r--sal/rtl/strtmpl.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sal/rtl/strtmpl.cxx b/sal/rtl/strtmpl.cxx
index 082dcd7d3913..bf58db0ba037 100644
--- a/sal/rtl/strtmpl.cxx
+++ b/sal/rtl/strtmpl.cxx
@@ -1356,10 +1356,11 @@ void SAL_CALL IMPL_RTL_STRINGNAME( newFromStr_WithLength )( IMPL_RTL_STRINGDATA*
SAL_THROW_EXTERN_C()
{
assert(ppThis);
+ assert(pCharStr != nullptr || nLen == 0);
assert(nLen >= 0);
IMPL_RTL_STRINGDATA* pOrg;
- if ( !pCharStr || (nLen <= 0) )
+ if ( nLen == 0 )
{
IMPL_RTL_STRINGNAME( new )( ppThis );
return;