summaryrefslogtreecommitdiff
path: root/comphelper/source/misc/docpasswordhelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'comphelper/source/misc/docpasswordhelper.cxx')
-rw-r--r--comphelper/source/misc/docpasswordhelper.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/comphelper/source/misc/docpasswordhelper.cxx b/comphelper/source/misc/docpasswordhelper.cxx
index 0ca3c01a55ab..ecf16fa2d3df 100644
--- a/comphelper/source/misc/docpasswordhelper.cxx
+++ b/comphelper/source/misc/docpasswordhelper.cxx
@@ -181,13 +181,12 @@ sal_uInt32 DocPasswordHelper::GetWordHashAsUINT32(
sal_uInt16 nHighResult = pInitialCode[nLen - 1];
sal_uInt16 nLowResult = 0;
- const sal_Unicode* pStr = aUString.getStr();
for ( sal_uInt32 nInd = 0; nInd < nLen; nInd++ )
{
// NO Encoding during conversion!
// The specification says that the low byte should be used in case it is not NULL
- char nHighChar = (char)( pStr[nInd] >> 8 );
- char nLowChar = (char)( pStr[nInd] & 0xFF );
+ char nHighChar = (char)( aUString[nInd] >> 8 );
+ char nLowChar = (char)( aUString[nInd] & 0xFF );
char nChar = nLowChar ? nLowChar : nHighChar;
for ( int nMatrixInd = 0; nMatrixInd < 7; ++nMatrixInd )