Skip to content

Commit

Permalink
fixed read_gmd()
Browse files Browse the repository at this point in the history
  • Loading branch information
Aerae committed Aug 28, 2024
1 parent a0065c9 commit 641d6af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ mod utils;

fn main() {
let level_string = utils::level::decode_level();
let level = utils::level::parse_level(level_string);
println!("{:?}", level);
let _level = utils::level::parse_level(level_string);
println!("done");
}

#[derive(Debug)]
Expand Down
6 changes: 5 additions & 1 deletion src/utils/level.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ pub fn read_gmd() -> String {
buf.clear();
}

txt[9].clone()
let mut idx = 0;
for i in 0..txt.len() {
if txt[i] == "k4" { idx = i + 1; }
}
txt[idx].clone()
}

pub fn decode_level() -> String {
Expand Down

0 comments on commit 641d6af

Please sign in to comment.