Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.

Commit

Permalink
fixed a bug where VM will crash if a register file is not provided
Browse files Browse the repository at this point in the history
  • Loading branch information
tarithj committed Apr 23, 2021
1 parent 455c01b commit 760bf14
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ fn main() {
let yaml = load_yaml!("cli.yaml");
let matches = App::from(yaml).get_matches();
let location = matches.value_of("FILE").unwrap();
let register_file_location = matches.value_of("reg").unwrap();


let mut register_file_location = "";

if let Some(x) = matches.value_of("reg") {
register_file_location = x;
}
println!("{}",register_file_location);
let info_log_filter = match matches.is_present("loginfo") {
true => LevelFilter::Info,
_ => LevelFilter::Off,
Expand Down

0 comments on commit 760bf14

Please sign in to comment.