Browse Source

Timeline: Avoid uninitialized read when drawing waveforms.

tags/non-daw-v1.2.0
Jonathan Moore Liles 13 years ago
parent
commit
989b6f0e4b
1 changed files with 7 additions and 7 deletions
  1. +7
    -7
      timeline/src/Waveform.C

+ 7
- 7
timeline/src/Waveform.C View File

@@ -99,17 +99,17 @@ Waveform::draw ( int X, int Y, int W, int H,
fl_color( color );
fl_begin_complex_polygon();
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 ) );
// j = start + ( W * skip );
j -= skip;
for ( int x = X + W; x >= X; x--, j -= skip )
fl_vertex( x, ty - ( halfheight * pbuf[ j ].max ) );
fl_end_complex_polygon();
}
}


Loading…
Cancel
Save