Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
untitaker committed Sep 27, 2020
1 parent d15cd38 commit 27ccb65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ fn decode_helper(
// trailing whitespace is so common that it's worth it to check the last byte to
// possibly return a better error message
if let Some(b) = input.last() {
if decode_table[*b as usize] == tables::INVALID_VALUE {
if *b != b'=' && decode_table[*b as usize] == tables::INVALID_VALUE {
return Err(DecodeError::InvalidByte(input.len() - 1, *b));
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ fn decode_reject_invalid_bytes_with_correct_error() {
index
);

if length % 4 == 1 {
if length % 4 == 1 && !suffix.is_empty() {
assert_eq!(DecodeError::InvalidLength, decode(&input).unwrap_err());
} else {
assert_eq!(
Expand Down

0 comments on commit 27ccb65

Please sign in to comment.