diff options
author | schnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2006-12-18 18:10:23 +0000 |
---|---|---|
committer | schnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2006-12-18 18:10:23 +0000 |
commit | a76c73dcdb4bd0b84f1eb3a7cc21d84d6d5dc4db (patch) | |
tree | cb741a64fcc03d7ecaf8641b05bc0ff33496c775 /src/util | |
parent | 3ebcacaca329058624fcc5da878796ed28bf30a4 (diff) |
Correct off-by-one error when checking for a legal timer number in
CCTK_TimerPrintDataI.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4395 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/CactusTimers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/CactusTimers.c b/src/util/CactusTimers.c index 912f4041..a0cf74b4 100644 --- a/src/util/CactusTimers.c +++ b/src/util/CactusTimers.c @@ -1228,7 +1228,7 @@ int CCTK_TimerPrintDataI (int this_timer, int this_clock) { firsttimer = this_timer; lasttimer = firsttimer + 1; - if (firsttimer < 0 || firsttimer > CCTK_NumTimers ()) + if (firsttimer < 0 || firsttimer >= CCTK_NumTimers ()) { CCTK_VWarn (8, __LINE__, __FILE__, "Cactus", "CCTK_TimerPrintDataI: Timer %d not found", this_timer); |