Reject odd number of hexits rather than ignoring the lone trailing hexit

This commit is contained in:
Tony Garnock-Jones 2022-10-26 12:49:34 +02:00
parent fd121cfb4c
commit ad1aec3d89
1 changed files with 5 additions and 1 deletions

View File

@ -36,7 +36,11 @@ impl HexParser {
},
}
}
Some(result)
if buf_full {
None // odd number of hexits
} else {
Some(result)
}
}
}