Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Specialize return types.
[simgrid.git] / src / smpi / bindings / smpi_pmpi.cpp
index b4a47dd..a20a5ff 100644 (file)
@@ -222,7 +222,7 @@ int PMPI_Error_string(int errorcode, char* string, int* resultlen){
       FOREACH_ERROR(GENERATE_STRING)
     };
     *resultlen = strlen(smpi_error_string[errorcode]);
-    strncpy(string, smpi_error_string[errorcode], *resultlen);
+    memcpy(string, smpi_error_string[errorcode], *resultlen*sizeof(char));
     return MPI_SUCCESS;  
   }
 }