diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-21 13:49:45 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-21 13:49:45 +0100 |
commit | 5e66c8c23925090bc230557704a23aaadbd5ad9a (patch) | |
tree | 5c97da9212cbd8d08e8c0c00b2c2f3779ec4073b /overlay | |
parent | 8b9f919b6346eac65be25e4f2e7c8f1b3168eb0a (diff) |
overlay: Fix underflow for clamping initial values
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'overlay')
-rw-r--r-- | overlay/chart.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/overlay/chart.c b/overlay/chart.c index 7353cb44..2a33d612 100644 --- a/overlay/chart.c +++ b/overlay/chart.c @@ -138,7 +138,7 @@ static void chart_update_range(struct chart *chart) static double value_at(struct chart *chart, int n) { - if (n <= chart->current_sample - chart->num_samples) + if (n < chart->current_sample - chart->num_samples) n = chart->current_sample; else if (n >= chart->current_sample) n = chart->current_sample - 1; |