From 48fe4a4ecd390bc349fda5398f134d8aa7ec9056 Mon Sep 17 00:00:00 2001 From: HyBer <59885141+BBboy01@users.noreply.github.com> Date: Fri, 8 Sep 2023 16:32:05 +0800 Subject: [PATCH] fix: update btoa boundary --- base64.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base64.js b/base64.js index d517861..63dcb1d 100644 --- a/base64.js +++ b/base64.js @@ -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."); }