sample-util: Fix off-by-one in error check

Patch by jk.illwinter on http://www.pulseaudio.org/ticket/951
This commit is contained in:
Arun Raghavan 2011-08-18 14:19:00 +05:30
parent 2568542b18
commit 9083a8f667

View file

@ -748,8 +748,8 @@ void pa_volume_memchunk(
return; return;
} }
if (spec->format < 0 || spec->format > PA_SAMPLE_MAX) { if (spec->format < 0 || spec->format >= PA_SAMPLE_MAX) {
pa_log_warn(" Unable to change volume of format %s.", pa_sample_format_to_string(spec->format)); pa_log_warn("Unable to change volume of format");
return; return;
} }