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

master
Andrzej Rybczak 17 years ago
parent 72cddfe77d
commit c4d88133bd
  1. 2
      src/mpdpp.cpp

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

Loading…
Cancel
Save