File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ function base (ALPHABET) {
8181 const size = ( ( ( source . length - psz ) * FACTOR ) + 1 ) >>> 0 // log(58) / log(256), rounded up.
8282 const b256 = new Uint8Array ( size )
8383 // Process the characters.
84- while ( source [ psz ] ) {
84+ while ( psz < source . length ) {
8585 // Decode character
8686 let carry = BASE_MAP [ source . charCodeAt ( psz ) ]
8787 // Invalid character
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ function base (ALPHABET) {
7979 const size = ( ( ( source . length - psz ) * FACTOR ) + 1 ) >>> 0 // log(58) / log(256), rounded up.
8080 const b256 = new Uint8Array ( size )
8181 // Process the characters.
82- while ( source [ psz ] ) {
82+ while ( psz < source . length ) {
8383 // Decode character
8484 let carry = BASE_MAP [ source . charCodeAt ( psz ) ]
8585 // Invalid character
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ function base (ALPHABET: string): base.BaseConverter {
100100 const b256 = new Uint8Array ( size )
101101
102102 // Process the characters.
103- while ( source [ psz ] ) {
103+ while ( psz < source . length ) {
104104 // Decode character
105105 let carry = BASE_MAP [ source . charCodeAt ( psz ) ]
106106
You can’t perform that action at this time.
0 commit comments