diff options
Diffstat (limited to 'sot')
-rw-r--r-- | sot/source/sdstor/stgdir.cxx | 8 | ||||
-rw-r--r-- | sot/source/sdstor/stgelem.cxx | 2 | ||||
-rw-r--r-- | sot/source/sdstor/stgio.cxx | 2 |
3 files changed, 9 insertions, 3 deletions
diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx index 4d7068374435..4daa409f7a3a 100644 --- a/sot/source/sdstor/stgdir.cxx +++ b/sot/source/sdstor/stgdir.cxx @@ -309,9 +309,13 @@ INT32 StgDirEntry::GetSize() BOOL StgDirEntry::SetSize( INT32 nNewSize ) { - if ( !( nMode & STREAM_WRITE ) - || !bDirect && !pTmpStrm && !Strm2Tmp() ) + if ( + !( nMode & STREAM_WRITE ) || + (!bDirect && !pTmpStrm && !Strm2Tmp()) + ) + { return FALSE; + } if( nNewSize < nPos ) nPos = nNewSize; diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx index d6fc8ce8f241..ed29ca8305a8 100644 --- a/sot/source/sdstor/stgelem.cxx +++ b/sot/source/sdstor/stgelem.cxx @@ -389,7 +389,7 @@ BOOL StgEntry::Load( const void* pFrom ) UINT16 n = nNameLen; if( n ) n = ( n >> 1 ) - 1; - if( n > 31 || nSize < 0 && cType != STG_STORAGE ) + if( n > 31 || (nSize < 0 && cType != STG_STORAGE) ) { // the size makes no sence for the substorage // TODO/LATER: actually the size should be an unsigned value, but in this case it would mean a stream of more than 2Gb diff --git a/sot/source/sdstor/stgio.cxx b/sot/source/sdstor/stgio.cxx index 1d5a1191d888..526f0f357f32 100644 --- a/sot/source/sdstor/stgio.cxx +++ b/sot/source/sdstor/stgio.cxx @@ -67,10 +67,12 @@ BOOL StgIo::Load() if( pStrm ) { if( aHdr.Load( *this ) ) + { if( aHdr.Check() ) SetupStreams(); else return FALSE; + } } return Good(); } |