summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sal/rtl/strtmpl.cxx11
1 files changed, 3 insertions, 8 deletions
diff --git a/sal/rtl/strtmpl.cxx b/sal/rtl/strtmpl.cxx
index e1ab1dce278c..c4f8fa605efa 100644
--- a/sal/rtl/strtmpl.cxx
+++ b/sal/rtl/strtmpl.cxx
@@ -1165,18 +1165,13 @@ static IMPL_RTL_STRCODE* IMPL_RTL_STRINGNAME( ImplNewCopy )( IMPL_RTL_STRINGDATA
pDest = pData->buffer;
pSrc = pStr->buffer;
- while ( nCount > 0 )
- {
- *pDest = *pSrc;
- pDest++;
- pSrc++;
- nCount--;
- }
+
+ memcpy( pDest, pSrc, nCount * sizeof(IMPL_RTL_STRCODE));
*ppThis = pData;
RTL_LOG_STRING_NEW( pData );
- return pDest;
+ return pDest + nCount;
}
/* ======================================================================= */