Thats what I get for copypasta

This commit is contained in:
ComlOnline 2018-01-30 21:30:37 +00:00
parent 863ea9c976
commit 46de5a704b

View file

@ -135,8 +135,8 @@ fn setup(args: &[String]) -> Setup {
let initial_volume; let initial_volume;
if matches.opt_present("initial-volume") && matches.opt_str("initial-volume").unwrap().parse::<i32>().is_ok() { if matches.opt_present("initial-volume") && matches.opt_str("initial-volume").unwrap().parse::<i32>().is_ok() {
let iv = matches.opt_str("zeroconf-port").unwrap().parse::<u16>().unwrap(); let matches.opt_str("initial-volume").unwrap().parse::<i32>().unwrap();
if iv => 0 && iv <= 100 { if 0 <= iv && iv <= 100 {
initial_volume = iv * 0xFFFF as i32 / 100 ; initial_volume = iv * 0xFFFF as i32 / 100 ;
} else { } else {
debug!("Volume needs to be a value from 0-100; set as 50%"); debug!("Volume needs to be a value from 0-100; set as 50%");