From 7c8b8ad24bda5d920ca3eb4d8e73eafb610fe903 Mon Sep 17 00:00:00 2001 From: tradke Date: Tue, 15 Jan 2002 18:21:06 +0000 Subject: 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 --- src/CheckpointRecovery.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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++; -- cgit v1.2.3