summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
Diffstat (limited to 'sal')
-rw-r--r--sal/rtl/source/strtmpl.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sal/rtl/source/strtmpl.cxx b/sal/rtl/source/strtmpl.cxx
index cdb4f11a0254..505d5aba51fa 100644
--- a/sal/rtl/source/strtmpl.cxx
+++ b/sal/rtl/source/strtmpl.cxx
@@ -1225,7 +1225,7 @@ void SAL_CALL IMPL_RTL_STRINGNAME( newFromLiteral )( IMPL_RTL_STRINGDATA** ppThi
sal_Int32 allocExtra )
SAL_THROW_EXTERN_C()
{
- if ( !nLen )
+ if ( nLen + allocExtra == 0 )
{
IMPL_RTL_STRINGNAME( new )( ppThis );
return;