Skip to content

Commit

Permalink
Merge pull request #47 from jpcima/work
Browse files Browse the repository at this point in the history
Fix invalid access on array by 1 element
  • Loading branch information
michaelwillis committed Jun 3, 2019
2 parents cf28a4c + e8c323a commit b247b7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/Spectrogram.cpp
Expand Up @@ -172,7 +172,7 @@ void Spectrogram::onDisplay() {
fNanoText->fontSize ( 16 );
fNanoText->textAlign ( NanoVG::ALIGN_RIGHT | NanoVG::ALIGN_MIDDLE );

for ( int i = 0 ; i < 6 ; i++ ) {
for ( int i = 0 ; i < 5 ; i++ ) {
int x = ( int ) ( image->getWidth() * logf ( decayTime[i] / SPECTROGRAM_MIN_SECONDS ) / logf ( SPECTROGRAM_MAX_SECONDS / SPECTROGRAM_MIN_SECONDS ) );
fNanoText->textBox ( x , getHeight() - 5 , 40.0f , decayTimeString[i].c_str(), nullptr );
}
Expand Down

0 comments on commit b247b7c

Please sign in to comment.