diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-07-15 12:25:35 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-07-15 20:44:10 +0100 |
commit | dc71a72753202d29544845cfd58992bac63c6837 (patch) | |
tree | 4c01c276acfa6cc66a1443bbc6d35a22fa1228c0 | |
parent | 89857aacac98f0f8e5dca4718affec493951f904 (diff) |
bump size type
Change-Id: I2c32c253499a3efb22a3312ed1f0a608649ce124
-rw-r--r-- | filter/qa/cppunit/data/met/fail/crash-1.met | bin | 0 -> 681 bytes | |||
-rw-r--r-- | filter/source/graphicfilter/ios2met/ios2met.cxx | 7 |
2 files changed, 4 insertions, 3 deletions
diff --git a/filter/qa/cppunit/data/met/fail/crash-1.met b/filter/qa/cppunit/data/met/fail/crash-1.met Binary files differnew file mode 100644 index 000000000000..c46b4a9f168a --- /dev/null +++ b/filter/qa/cppunit/data/met/fail/crash-1.met diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx index f59567b3e31f..0120a90cec57 100644 --- a/filter/source/graphicfilter/ios2met/ios2met.cxx +++ b/filter/source/graphicfilter/ios2met/ios2met.cxx @@ -208,7 +208,7 @@ enum PenStyle { PEN_NULL, PEN_SOLID, PEN_DOT, PEN_DASH, PEN_DASHDOT }; struct OSPalette { OSPalette * pSucc; sal_uInt32 * p0RGB; // May be NULL! - sal_uInt16 nSize; + size_t nSize; }; struct OSArea { @@ -733,12 +733,13 @@ void OS2METReader::SetPalette0RGB(sal_uInt16 nIndex, sal_uLong nCol) } if (pPaletteStack->p0RGB==NULL || nIndex>=pPaletteStack->nSize) { sal_uInt32 * pOld0RGB=pPaletteStack->p0RGB; - sal_uInt16 i,nOldSize=pPaletteStack->nSize; + size_t nOldSize = pPaletteStack->nSize; if (pOld0RGB==NULL) nOldSize=0; pPaletteStack->nSize=2*(nIndex+1); if (pPaletteStack->nSize<256) pPaletteStack->nSize=256; pPaletteStack->p0RGB = new sal_uInt32[pPaletteStack->nSize]; - for (i=0; i<pPaletteStack->nSize; i++) { + for (size_t i=0; i < pPaletteStack->nSize; ++i) + { if (i<nOldSize) pPaletteStack->p0RGB[i]=pOld0RGB[i]; else if (i==0) pPaletteStack->p0RGB[i]=0x00ffffff; else pPaletteStack->p0RGB[i]=0; |