summaryrefslogtreecommitdiff
path: root/basic/source/classes/image.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basic/source/classes/image.cxx')
-rw-r--r--basic/source/classes/image.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx
index 703dbd41b7e1..3faabae95793 100644
--- a/basic/source/classes/image.cxx
+++ b/basic/source/classes/image.cxx
@@ -240,13 +240,13 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
}
break;
}
- case B_SBXOBJECTS:
+ case B_USERTYPES:
{
//assuming an empty string with just the lead 32bit/16bit len indicator
const size_t nMinStringSize = (eCharSet == RTL_TEXTENCODING_UNICODE) ? 4 : 2;
const size_t nMinRecordSize = nMinStringSize + sizeof(sal_Int16);
const size_t nMaxRecords = r.remainingSize() / nMinRecordSize;
- if (nCount > nMinRecordSize)
+ if (nCount > nMaxRecords)
{
SAL_WARN("basic", "Parsing error: " << nMaxRecords <<
" max possible entries, but " << nCount << " claimed, truncating");
@@ -458,7 +458,7 @@ bool SbiImage::Save( SvStream& r, sal_uInt32 nVer )
sal_uInt16 nTypes = rTypes->Count();
if (nTypes > 0 )
{
- nPos = SbiOpenRecord( r, B_SBXOBJECTS, nTypes );
+ nPos = SbiOpenRecord( r, B_USERTYPES, nTypes );
for (sal_uInt16 i = 0; i < nTypes; i++)
{