Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update lib/buffer.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
XadillaX and aduh95 committed Oct 8, 2022
commit c43f22363b84943d13f02a546c21d256cdf477ad
2 changes: 1 addition & 1 deletion lib/buffer.js
Original file line number Diff line number Diff line change
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 `=`
Comment thread
aduh95 marked this conversation as resolved.
Outdated
equalCharCount++;
} else if (equalCharCount) {
Expand Down