Timeline: Avoid uninitialized read when drawing waveforms.
This commit is contained in:
parent
e219e6766e
commit
989b6f0e4b
|
@ -102,10 +102,10 @@ Waveform::draw ( int X, int Y, int W, int H,
|
||||||
|
|
||||||
j = start;
|
j = start;
|
||||||
|
|
||||||
for ( int x = X; x < X + W; x++, j += skip )
|
for ( int x = X; x <= X + W; x++, j += skip )
|
||||||
fl_vertex( x, ty - ( halfheight * pbuf[ j ].min ) );
|
fl_vertex( x, ty - ( halfheight * pbuf[ j ].min ) );
|
||||||
|
|
||||||
// j = start + ( W * skip );
|
j -= skip;
|
||||||
|
|
||||||
for ( int x = X + W; x >= X; x--, j -= skip )
|
for ( int x = X + W; x >= X; x--, j -= skip )
|
||||||
fl_vertex( x, ty - ( halfheight * pbuf[ j ].max ) );
|
fl_vertex( x, ty - ( halfheight * pbuf[ j ].max ) );
|
||||||
|
|
Loading…
Reference in New Issue