Skip to content

Commit

Permalink
Fix base64 encoder
Browse files Browse the repository at this point in the history
  • Loading branch information
ixti committed Aug 1, 2012
1 parent 8a17da1 commit 8eb3d5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions demo/js/base64.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@
length = str.length;

while (offset < length) {
char = str[offset];
char = str.charAt(offset);
offset += 1;

if ('%' !== char) {
bytes.push(char.charCodeAt(0));
} else {
char = str[offset] + str[offset + 1];
char = str.charAt(offset) + str.charAt(offset + 1);
bytes.push(parseInt(char, 16));
offset += 2;
}
Expand Down

0 comments on commit 8eb3d5b

Please sign in to comment.