correct a bug in unpacking the string. Needed initialisation before unpacking

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1398 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
fatene 2009-02-04 10:06:23 +00:00
commit 6026fa430e

View file

@ -338,6 +338,7 @@ void unpack (std::string & __str)
char * buffer;
int len;
MPI_Unpack (mpi_buf, MPI_BUF_SIZE, & pos_buf, & len, 1, MPI_INT, MPI_COMM_WORLD);
buffer = new char[len+1];
MPI_Unpack (mpi_buf, MPI_BUF_SIZE, & pos_buf, buffer, len, MPI_CHAR, MPI_COMM_WORLD);
__str.assign( buffer );