From 3bc1c6b59e4f622c21637ce24f1fd8644dfb806e Mon Sep 17 00:00:00 2001
From: Axel Kohlmeyer <akohlmey@gmail.com>
Date: Thu, 1 Feb 2018 14:25:55 +0100
Subject: [PATCH] Address bug in multifile restart writing with step number
 included

---
 src/write_restart.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/write_restart.cpp b/src/write_restart.cpp
index ad6c756558..082e1b873d 100644
--- a/src/write_restart.cpp
+++ b/src/write_restart.cpp
@@ -95,6 +95,7 @@ void WriteRestart::command(int narg, char **arg)
   if ((ptr = strchr(arg[0],'*'))) {
     *ptr = '\0';
     sprintf(file,"%s" BIGINT_FORMAT "%s",arg[0],update->ntimestep,ptr+1);
+    *ptr = '*'; // must restore arg[0] so it can be correctly parsed below
   } else strcpy(file,arg[0]);
 
   // check for multiproc output and an MPI-IO filename
-- 
GitLab