Browse Source

Thats what I get for copypasta

ComlOnline 7 years ago
parent
commit
46de5a704b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/main.rs

+ 2 - 2
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::<i32>().is_ok() {
-            let iv = matches.opt_str("zeroconf-port").unwrap().parse::<u16>().unwrap();
-            if iv => 0 && iv <= 100 {
+            let matches.opt_str("initial-volume").unwrap().parse::<i32>().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%");