File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -216,7 +216,7 @@ fn decode_helper(
216216 // trailing whitespace is so common that it's worth it to check the last byte to
217217 // possibly return a better error message
218218 if let Some ( b) = input. last ( ) {
219- if decode_table[ * b as usize ] == tables:: INVALID_VALUE {
219+ if * b != b'=' && decode_table[ * b as usize ] == tables:: INVALID_VALUE {
220220 return Err ( DecodeError :: InvalidByte ( input. len ( ) - 1 , * b) ) ;
221221 }
222222 }
Original file line number Diff line number Diff line change @@ -292,7 +292,7 @@ fn decode_reject_invalid_bytes_with_correct_error() {
292292 index
293293 ) ;
294294
295- if length % 4 == 1 {
295+ if length % 4 == 1 && !suffix . is_empty ( ) {
296296 assert_eq ! ( DecodeError :: InvalidLength , decode( & input) . unwrap_err( ) ) ;
297297 } else {
298298 assert_eq ! (
You can’t perform that action at this time.
0 commit comments