Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix stripping of first argument.
[simgrid.git] / src / smpi / smpi_base.c
index f3bfa38..f0605ea 100644 (file)
@@ -200,7 +200,7 @@ void smpi_process_init(int *argc, char ***argv)
   pdata->index = atoi((*argv)[1]);
   DEBUG1("I'm rank <%d>", pdata->index);
   if (*argc > 2) {
-    memmove((*argv)[1], (*argv)[2], sizeof(char *) * (*argc - 2));
+    memmove(&(*argv)[1], &(*argv)[2], sizeof(char *) * (*argc - 2));
     (*argv)[(*argc) - 1] = NULL;
   }
   (*argc)--;