summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2003-12-17 14:38:03 +0000
committerVladimir Glazounov <vg@openoffice.org>2003-12-17 14:38:03 +0000
commit1774a38c243f9dc6d101396935f7cb7ca573d492 (patch)
treeb19727ed77f7020c7f479ac9d0fa68be43e97491 /bridges
parenta9b5a67e8a1dce3682dc4b71fbd8bcca1f0fcc8d (diff)
INTEGRATION: CWS geordi2q11 (1.6.98); FILE MERGED
2003/12/15 17:37:23 hr 1.6.98.1: #111934#: join CWS ooo111fix1
Diffstat (limited to 'bridges')
-rw-r--r--bridges/source/remote/urp/urp_unmarshal.hxx24
1 files changed, 18 insertions, 6 deletions
diff --git a/bridges/source/remote/urp/urp_unmarshal.hxx b/bridges/source/remote/urp/urp_unmarshal.hxx
index ebaa4c61cea8..21cd12210830 100644
--- a/bridges/source/remote/urp/urp_unmarshal.hxx
+++ b/bridges/source/remote/urp/urp_unmarshal.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: urp_unmarshal.hxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: kso $ $Date: 2002-10-18 09:27:19 $
+ * last change: $Author: vg $ $Date: 2003-12-17 15:38:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -170,12 +170,24 @@ inline sal_Bool Unmarshal::setSize( sal_Int32 nSize )
{
if( nSize > m_nBufferSize )
{
- m_nBufferSize = nSize;
- m_base = (sal_Int8 * ) rtl_reallocateMemory( (sal_uInt8*) m_base , m_nBufferSize );
+ // adjust buffer size and length.
+ sal_Int8 * base =
+ (sal_Int8*)rtl_reallocateMemory (m_base, sal_Size(nSize));
+ if (base != 0)
+ {
+ m_base = base;
+ m_nLength = m_nBufferSize = nSize;
+ }
+ }
+ else
+ {
+ // adjust buffer length, only.
+ m_nLength = nSize;
}
+
+ // reset buffer position, and leave.
m_pos = m_base;
- m_nLength = nSize;
- return ( 0 != m_base );
+ return (m_nLength == nSize);
}
inline sal_Bool Unmarshal::checkOverflow( sal_Int32 nNextMem )