fix host option

This commit is contained in:
SpikeHD
2023-04-21 18:09:27 -07:00
parent e6492825dc
commit 45ecfcbeb3

View File

@@ -114,7 +114,7 @@ async fn parse_args(inp: &Vec<String>) -> Result<Args, ArgsError> {
); );
} }
if !args.value_of::<String>("host")?.is_empty() { if args.value_of::<String>("host").is_ok() && !args.value_of::<String>("host")?.is_empty() {
let host = args.value_of::<String>("host")?; let host = args.value_of::<String>("host")?;
set_proxy_addr(host); set_proxy_addr(host);
} }
@@ -224,7 +224,7 @@ fn main() -> Result<(), ArgsError> {
disconnect(); disconnect();
// Always unpatch game upon closing the program // Always unpatch game upon closing the program
patch::unpatch_game(); block_on(patch::unpatch_game());
Ok(()) Ok(())
} }