Skip to content

Commit

Permalink
Update lib/buffer.js
Browse files Browse the repository at this point in the history
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
XadillaX and aduh95 committed Oct 8, 2022
1 parent c8edb80 commit c43f223
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/buffer.js
Expand Up @@ -1280,7 +1280,7 @@ function atob(input) {
// ASCII whitespace char codes.
nonAsciiWhitespaceCharCount++;

if (index === kForgivingBase64AllowedChars.length - 1) {
if (index === kForgivingBase64AllowedChars.length - 1 && equalCharCount !== 2) {
// The last element of `kForgivingBase64AllowedChars` is the `=`
equalCharCount++;
} else if (equalCharCount) {
Expand Down

0 comments on commit c43f223

Please sign in to comment.