cmcfixes69: #i108151#: remotebridges: fix strict aliasing

This commit is contained in:
Caolán McNamara 2010-01-08 12:41:03 +00:00
parent 9815530eb1
commit a3a11b622b

View file

@ -77,8 +77,8 @@ namespace remotebridges_bridge
try try
{ {
// TODO possible optimization : give // TODO possible optimization : give
::rtl::ByteSequence seq( nSize , ::rtl::BYTESEQ_NODEFAULT ); Sequence<sal_Int8> seq = toUnoSequence( ::rtl::ByteSequence(nSize, ::rtl::BYTESEQ_NODEFAULT) );
sal_Int32 nRead = m->m_r->read( *(Sequence<sal_Int8>*)&seq , nSize ); sal_Int32 nRead = m->m_r->read( seq , nSize );
memcpy( pDest , seq.getConstArray() , nRead ); memcpy( pDest , seq.getConstArray() , nRead );
return nRead; return nRead;
} }