From 26098d7a88c9e24ed5f48ded6514654a1fa9615a Mon Sep 17 00:00:00 2001 From: Matthieu Grieger Date: Sat, 25 Jun 2016 12:50:08 -0700 Subject: [PATCH] Made volume range check inclusive --- commands/volume.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/volume.go b/commands/volume.go index ee0061e..68c1524 100644 --- a/commands/volume.go +++ b/commands/volume.go @@ -55,7 +55,7 @@ func (c *VolumeCommand) Execute(user *gumble.User, args ...string) (string, bool return "", true, errors.New(viper.GetString("commands.volume.messages.parsing_error")) } - if newVolume < viper.GetFloat64("volume.lowest") || newVolume > viper.GetFloat64("volume.highest") { + if newVolume <= viper.GetFloat64("volume.lowest") || newVolume >= viper.GetFloat64("volume.highest") { return "", true, fmt.Errorf(viper.GetString("commands.volume.messages.out_of_range_error"), viper.GetFloat64("volume.lowest"), viper.GetFloat64("volume.highest")) }