We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d15cd38 commit 27ccb65Copy full SHA for 27ccb65
2 files changed
src/decode.rs
@@ -216,7 +216,7 @@ fn decode_helper(
216
// trailing whitespace is so common that it's worth it to check the last byte to
217
// possibly return a better error message
218
if let Some(b) = input.last() {
219
- if decode_table[*b as usize] == tables::INVALID_VALUE {
+ if *b != b'=' && decode_table[*b as usize] == tables::INVALID_VALUE {
220
return Err(DecodeError::InvalidByte(input.len() - 1, *b));
221
}
222
tests/decode.rs
@@ -292,7 +292,7 @@ fn decode_reject_invalid_bytes_with_correct_error() {
292
index
293
);
294
295
- if length % 4 == 1 {
+ if length % 4 == 1 && !suffix.is_empty() {
296
assert_eq!(DecodeError::InvalidLength, decode(&input).unwrap_err());
297
} else {
298
assert_eq!(
0 commit comments