Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ pub fn from_hex_pad<R: hex::FromHex<Error = hex::FromHexError>, T: AsRef<[u8]>>(
hex: T,
) -> Result<R, hex::FromHexError> {
let hex = hex.as_ref();
let hex = if hex.starts_with(b"0x") {
let hex = if hex.starts_with(b"0x") || hex.starts_with(b"\\x") {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check needs to be in its own branch to account for enclosing delimiters.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are those? The escaped literal goes: \xAABBCCDD, with no tail.

&hex[2..]
} else if hex.starts_with(b"X'") {
&hex[2..hex.len()]
Expand Down