do not attempt to change volume if requested value is <0 or >100

This commit is contained in:
Andrzej Rybczak
2009-06-28 05:25:50 +02:00
parent 72cddfe77d
commit c4d88133bd

View File

@@ -512,7 +512,7 @@ void Connection::SetConsume(bool mode) const
void Connection::SetVolume(int vol)
{
if (isConnected)
if (isConnected && vol >= 0 && vol <= 100)
{
mpd_sendSetvolCommand(itsConnection, vol);
mpd_finishCommand(itsConnection);