diff options
author | tradke <tradke@b32723a9-ab3a-4a60-88e2-2e5d99d7c17a> | 2002-01-15 18:21:06 +0000 |
---|---|---|
committer | tradke <tradke@b32723a9-ab3a-4a60-88e2-2e5d99d7c17a> | 2002-01-15 18:21:06 +0000 |
commit | 7c8b8ad24bda5d920ca3eb4d8e73eafb610fe903 (patch) | |
tree | d009276a1472bfd4194c282067d2f7215a0b2077 | |
parent | d1fb60f99d8a1d8eb1cbaf673dffb05fa24610b5 (diff) |
Workaround for a bug in the pgcc compiler when searching for checkpoint files
during recovery.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOUtil/trunk@146 b32723a9-ab3a-4a60-88e2-2e5d99d7c17a
-rw-r--r-- | src/CheckpointRecovery.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/CheckpointRecovery.c b/src/CheckpointRecovery.c index efbad8f..d35e551 100644 --- a/src/CheckpointRecovery.c +++ b/src/CheckpointRecovery.c @@ -609,7 +609,8 @@ int IOUtil_RecoverParameters (int (*recoverFn) (cGH *GH, filelist = tmp; filelist[num_files].basename = strdup (file->d_name); /* cut the filename after the iteration number field */ - filelist[num_files].basename[p - file->d_name] = 0; + len = p - file->d_name; + filelist[num_files].basename[len] = 0; filelist[num_files].iteration = atoi (file->d_name + recover_file_len+4); num_files++; |