bug in write_restart

Hi all,

There seems to be a small bug in WriteRestart::write(char *file), that can lead to a crash in Lammps.

It can be resolved by adding the line:
*ptr = ‘%’;
after
sprintf(multiname,"%s%d%s",file,icluster,ptr+1);
in write_restart.cpp, as is also done in the same routine a few lines earlier. This will undo the ‘%’ removal from the variable ‘file’ by the line just before the sprintf call.

Nevertheless, a possibly neater solution is not changing the variable ‘file’ in the write(…) routine, but only ‘multiname’ (and ‘hfile’).

Thanks,
Bart

Added the line - will be in next patch.

Thanks,
Steve