summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2013-06-24 13:31:27 +0200
committerMichael Stahl <mstahl@redhat.com>2013-06-24 11:59:15 +0000
commitac4a743dd901aed6e83b00cd7f8a99eb6618bd3a (patch)
treef0b34dee383e62a2c36b91c99fa01750af3d0c85
parentc3bd749c3da8e8c20e3acca3b8fed3df5c229abb (diff)
convert the right number of elements
(cherry picked from commit e3a8e4f221fca5f67f4d6caf17f3bec39b13e3d5) Signed-off-by: David Tardon <dtardon@redhat.com> Conflicts: include/oox/helper/binaryoutputstream.hxx Change-Id: I375d03ad880d348be64a04613e612e19bf2f4e1c Reviewed-on: https://gerrit.libreoffice.org/4478 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--oox/inc/oox/helper/binaryoutputstream.hxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/oox/inc/oox/helper/binaryoutputstream.hxx b/oox/inc/oox/helper/binaryoutputstream.hxx
index 773f0d03d51c..15d1de42e450 100644
--- a/oox/inc/oox/helper/binaryoutputstream.hxx
+++ b/oox/inc/oox/helper/binaryoutputstream.hxx
@@ -93,7 +93,7 @@ template< typename Type >
void BinaryOutputStream::writeArray( Type* opnArray, sal_Int32 nElemCount )
{
sal_Int32 nWriteSize = getLimitedValue< sal_Int32, sal_Int32 >( nElemCount, 0, SAL_MAX_INT32 / sizeof( Type ) ) * sizeof( Type );
- ByteOrderConverter::convertLittleEndianArray( opnArray, static_cast< size_t >( nWriteSize ) );
+ ByteOrderConverter::convertLittleEndianArray( opnArray, static_cast< size_t >( nElemCount ) );
writeMemory( opnArray, nWriteSize, sizeof( Type ) );
}