diff options
author | Daniel Boelzle <dbo@openoffice.org> | 2001-03-19 09:16:58 +0000 |
---|---|---|
committer | Daniel Boelzle <dbo@openoffice.org> | 2001-03-19 09:16:58 +0000 |
commit | e03e840472832ac375ce24ec6273a0bef27bcefb (patch) | |
tree | bc386f910af3ae518379cf97e03b320daa67e05f /xmlscript/test | |
parent | ad38c63275f93790582d481b238ab6fa75557252 (diff) |
*** empty log message ***
Diffstat (limited to 'xmlscript/test')
-rw-r--r-- | xmlscript/test/imexp.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/xmlscript/test/imexp.cxx b/xmlscript/test/imexp.cxx index 8ca57a573c2d..ffd78a9852dd 100644 --- a/xmlscript/test/imexp.cxx +++ b/xmlscript/test/imexp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: imexp.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: dbo $ $Date: 2001-03-19 10:08:36 $ + * last change: $Author: dbo $ $Date: 2001-03-19 10:16:58 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -60,6 +60,7 @@ ************************************************************************/ #include <stdio.h> +#include <rtl/memory.h> #include <xmlscript/xmldlg_imexp.hxx> #include <xmlscript/xml_helper.hxx> @@ -265,15 +266,11 @@ void exportToFile( nRead = xStream->readBytes( readBytes, 1024 ); if (! nRead) break; + OSL_ASSERT( readBytes.getLength() >= nRead ); sal_Int32 nPos = bytes.getLength(); bytes.realloc( nPos + nRead ); - sal_Int8 * pBytes = bytes.getArray(); - sal_Int8 const * pReadBytes = readBytes.getConstArray(); - while (nRead--) - { - pBytes[ nPos + nRead ] = pReadBytes[ nRead ]; - } + ::rtl_copyMemory( bytes.getArray() + nPos, readBytes.getConstArray(), (sal_uInt32)nRead ); } FILE * f = ::fopen( fname, "w" ); |