overlay: Fix underflow for clamping initial values

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-08-21 13:49:45 +01:00
parent 8b9f919b63
commit 5e66c8c239

View File

@ -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;