Skip to content
Snippets Groups Projects
Commit 3eab1de2 authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Fix lammps patch

When using extra arguments after the name of the log file,
the former could have been overwritten by reeplica suffix.

Bug reported by Marco De La Pierre.
parent cb5ba076
No related branches found
No related tags found
No related merge requests found
......@@ -103,9 +103,9 @@ FixPlumed::FixPlumed(LAMMPS *lmp, int narg, char **arg) :
else if(next==1){
// Each replica writes an independent log file
// with suffix equal to the replica id
char str_num[32], *logFile;
char str_num[32], logFile[1024];
sprintf(str_num,".%d",universe->iworld);
logFile=arg[i];
strncpy(logFile,arg[i],1024);
strcat(logFile,str_num);
p->cmd("setLogFile",logFile);
next=0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment