summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-01-13 14:22:30 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-01-13 14:22:30 +0000
commit15cee52b62c760e1cb212d34d9279c5eee5ecb6d (patch)
tree5939078215f0655dc8a917758c485aace55797f3 /vcl
parent467e32348faf71ed1aa4039910e7a6ba6dd2eb8c (diff)
use the same number in alloc and memset
Change-Id: Ie532985e655d1dd383a1781422213cee0787bfae
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/filter/ixpm/xpmread.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/vcl/source/filter/ixpm/xpmread.cxx b/vcl/source/filter/ixpm/xpmread.cxx
index d9d237d8f23f..57dd2b3f10d6 100644
--- a/vcl/source/filter/ixpm/xpmread.cxx
+++ b/vcl/source/filter/ixpm/xpmread.cxx
@@ -216,8 +216,9 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic )
// using 2 charakters per pixel and less than 257 Colors we speed up
if ( mnCpp == 2 ) // by using a 64kb indexing table
{
- mpFastColorTable = new sal_uInt8[ 256 * 256 ];
- memset(mpFastColorTable, 0, 255 * 255);
+ const size_t nSize = 256 * 256;
+ mpFastColorTable = new sal_uInt8[nSize];
+ memset(mpFastColorTable, 0, nSize);
for ( pPtr = mpColMap, i = 0; i < mnColors; i++, pPtr += mnCpp + 4 )
{
sal_uLong j = pPtr[ 0 ] << 8;