Skip to content

Commit

Permalink
Manual check for common ascii range fix
Browse files Browse the repository at this point in the history
  • Loading branch information
squadgazzz committed Nov 15, 2023
1 parent 44b8ed4 commit 337a89e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ethcontract-common/src/bytecode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl Bytecode {

if let Some(pos) = block
.bytes()
.position(|b| !matches!(b, b'0'..=b'9' | b'a'..=b'f' | b'A'..=b'F'))
.position(|b| !b.is_ascii_hexdigit())
{
return Err(BytecodeError::InvalidHexDigit(
block.chars().nth(pos).expect("valid pos"),
Expand Down

0 comments on commit 337a89e

Please sign in to comment.