diff options
Diffstat (limited to 'indra/llcommon/lltracerecording.h')
-rw-r--r-- | indra/llcommon/lltracerecording.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/indra/llcommon/lltracerecording.h b/indra/llcommon/lltracerecording.h index efed3f662e..a3af215dd3 100644 --- a/indra/llcommon/lltracerecording.h +++ b/indra/llcommon/lltracerecording.h @@ -234,6 +234,7 @@ namespace LLTrace { public: PeriodicRecording(S32 num_periods, EStopWatchState state = STOPPED); + PeriodicRecording(PeriodicRecording& recording); ~PeriodicRecording(); void nextPeriod(); @@ -261,11 +262,13 @@ namespace LLTrace Recording& getPrevRecordingPeriod(S32 offset) { + offset = llclamp(offset, 0, mNumPeriods - 1); return mRecordingPeriods[(mCurPeriod + mNumPeriods - offset) % mNumPeriods]; } const Recording& getPrevRecordingPeriod(S32 offset) const { + offset = llclamp(offset, 0, mNumPeriods - 1); return mRecordingPeriods[(mCurPeriod + mNumPeriods - offset) % mNumPeriods]; } |