From 5a040e2ea7b4fbc6b24377d37707324b45a3534c Mon Sep 17 00:00:00 2001 From: tradke Date: Tue, 29 Jun 2004 09:39:17 +0000 Subject: Fix for my last commit: destroy groups in ascending order. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@449 b61c5cb5-eaca-4651-9a7a-d64986f99364 --- src/SetupPGH.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/SetupPGH.c b/src/SetupPGH.c index b14088e..8a6882b 100644 --- a/src/SetupPGH.c +++ b/src/SetupPGH.c @@ -219,10 +219,7 @@ void PUGH_DestroyPGH (pGH **GHin) pGH *GH; pGA *GA; cGroup pgroup; - int i; - int variable; - int group; - int this_var; + int i, group, numgroups, this_var, variable; GH = *GHin; @@ -244,7 +241,8 @@ void PUGH_DestroyPGH (pGH **GHin) /* Great. Now go about the work of destroying me. */ variable = 0; - for (group = CCTK_NumGroups () - 1; group >= 0; group--) + numgroups = CCTK_NumGroups (); + for (group = 0; group < numgroups; group++) { #ifdef DEBUG_PUGH printf ("Calling Destroying Group %s\n", CCTK_GroupName (group)); -- cgit v1.2.3