sample-util: Fix off-by-one in error check
authorArun Raghavan <arun.raghavan@collabora.co.uk>
Thu, 18 Aug 2011 08:49:00 +0000 (14:19 +0530)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Thu, 18 Aug 2011 08:49:00 +0000 (14:19 +0530)
Patch by jk.illwinter on http://www.pulseaudio.org/ticket/951

src/pulsecore/sample-util.c

index 16ec4ad..a9e486e 100644 (file)
@@ -748,8 +748,8 @@ void pa_volume_memchunk(
         return;
     }
 
-    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));
+    if (spec->format < 0 || spec->format >= PA_SAMPLE_MAX) {
+      pa_log_warn("Unable to change volume of format");
       return;
     }