fix out of buffer read in equalizer code

parent 2dfa55bd
...@@ -364,9 +364,9 @@ void Equalizer::setValues( char *psz_bands, float f_preamp ) ...@@ -364,9 +364,9 @@ void Equalizer::setValues( char *psz_bands, float f_preamp )
sprintf( psz_val, "% 5.1f", f ); sprintf( psz_val, "% 5.1f", f );
band_texts[i]->setText( band_frequencies[i] + "\n" + psz_val + band_texts[i]->setText( band_frequencies[i] + "\n" + psz_val +
"dB" ); "dB" );
if( p == NULL ) break; if( p == NULL || *p == '\0' ) break;
p++; p++;
if( *p == 0 ) break; if( *p == '\0' ) break;
} }
} }
char psz_val[5]; char psz_val[5];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment