Skip to content

Commit

Permalink
fixed 0x00 bytes in name and description
Browse files Browse the repository at this point in the history
  • Loading branch information
cqb13 committed Jun 29, 2024
1 parent 24a79b2 commit cc4dbe7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/commands/convert/xp_to_txt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ impl Header {

let comment = header_bytes[11..53]
.iter()
.filter(|byte| **byte != 0x00)
.map(|byte| *byte as char)
.collect::<String>();

Expand Down Expand Up @@ -226,6 +227,7 @@ impl MetaData {
let file_type = FileType::from_byte(meta_data_bytes[4]);
let name = meta_data_bytes[5..13]
.iter()
.filter(|byte| **byte != 0x00)
.map(|byte| *byte as char)
.collect::<String>();
let version = meta_data_bytes[13];
Expand Down

0 comments on commit cc4dbe7

Please sign in to comment.