lib: fix volume range check in libvlc_audio_set_volume()
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 19 May 2014 11:04:13 +0000 (19:04 +0800)
committerRémi Denis-Courmont <remi@remlab.net>
Tue, 20 May 2014 11:10:21 +0000 (19:10 +0800)
lib/audio.c

index 8b93b55..9f42db1 100644 (file)
@@ -334,7 +334,7 @@ int libvlc_audio_get_volume( libvlc_media_player_t *mp )
 int libvlc_audio_set_volume( libvlc_media_player_t *mp, int volume )
 {
     float vol = volume / 100.f;
-    if (vol < 0.f)
+    if (!isgreaterequal(vol, 0.f))
     {
         libvlc_printerr( "Volume out of range" );
         return -1;