From 46de5a704b08d42a8d57b62ef103f0529c0195af Mon Sep 17 00:00:00 2001 From: ComlOnline Date: Tue, 30 Jan 2018 21:30:37 +0000 Subject: [PATCH] Thats what I get for copypasta --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index cccfb268..45c5ec87 100644 --- a/src/main.rs +++ b/src/main.rs @@ -135,8 +135,8 @@ fn setup(args: &[String]) -> Setup { let initial_volume; if matches.opt_present("initial-volume") && matches.opt_str("initial-volume").unwrap().parse::().is_ok() { - let iv = matches.opt_str("zeroconf-port").unwrap().parse::().unwrap(); - if iv => 0 && iv <= 100 { + let matches.opt_str("initial-volume").unwrap().parse::().unwrap(); + if 0 <= iv && iv <= 100 { initial_volume = iv * 0xFFFF as i32 / 100 ; } else { debug!("Volume needs to be a value from 0-100; set as 50%");