diff --git a/src/write_restart.cpp b/src/write_restart.cpp index 1b5a25a888..541bf45942 100644 --- a/src/write_restart.cpp +++ b/src/write_restart.cpp @@ -307,6 +307,7 @@ void WriteRestart::write(char *file) char *ptr = strchr(file,'%'); *ptr = '\0'; sprintf(multiname,"%s%d%s",file,icluster,ptr+1); + *ptr = '%'; if (filewriter) { fp = fopen(multiname,"wb");