Skip to content

Commit

Permalink
fix: update btoa boundary
Browse files Browse the repository at this point in the history
  • Loading branch information
BBboy01 authored Sep 8, 2023
1 parent 0048721 commit 48fe4a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base64.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
o2 = data.charCodeAt (i++);
o3 = data.charCodeAt (i++);

if (o1 > 128 || o2 > 128 || o3 > 128) {
if (o1 > 255 || o2 > 255 || o3 > 255) {
throw new InvalidCharacterError ("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");
}

Expand Down

0 comments on commit 48fe4a4

Please sign in to comment.