Skip to content

Commit

Permalink
Merge pull request #115 from McSib/97-non-number-characters-in-id-fix
Browse files Browse the repository at this point in the history
Non-number characters in ID-only groups will no longer BSOD computers
  • Loading branch information
McSib authored May 3, 2023
2 parents 5a3653d + 94c2e68 commit 07e1a34
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/e621/io/tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,11 @@ impl TagParser {
TagIdentifier::id_tag(tag.trim(), self.request_sender.clone())
}
e => {
let temp_char = self.parser.next_char();
if !char::is_ascii_digit(&temp_char) && temp_char != '#' {
panic!("Invalid tag type! Pools, sets, and single-post tags must be a number!");
}

let tag = self.parser.consume_while(valid_id);
let tag_type = match e {
"pools" => TagType::Pool,
Expand Down

0 comments on commit 07e1a34

Please sign in to comment.