Skip to content

Commit

Permalink
Fix base64 support
Browse files Browse the repository at this point in the history
  • Loading branch information
konsoletyper committed Dec 28, 2015
1 parent 8f58b92 commit 5da32e3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion classlib/src/main/java/org/teavm/classlib/impl/Base64.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static byte[] decode(String text) {

int triples = (outputSize / 3) * 3;
i = 0;
for (j = 0; i < triples;) {
for (j = 0; j < triples;) {
int a = decode(text.charAt(i++));
int b = decode(text.charAt(i++));
int c = decode(text.charAt(i++));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public void loadsResources() {
assertEquals("qwerty", loadResource("6"));
assertEquals("qwertyu", loadResource("7"));
assertEquals("qwertyui", loadResource("8"));
assertEquals("qwertyuiopasdfghjklzxcvbnm", loadResource("9"));
}

private static String loadResource(String name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
public class TestResourcesSupplier implements ResourceSupplier {
@Override
public String[] supplyResources(ClassLoader classLoader, ListableClassReaderSource classSource) {
String[] result = { "1", "2", "3", "4", "5", "6", "7", "8" };
String[] result = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
for (int i = 0; i < result.length; ++i) {
result[i] = "resources-for-test/" + result[i];
}
Expand Down
1 change: 1 addition & 0 deletions tests/src/test/resources/resources-for-test/9
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
qwertyuiopasdfghjklzxcvbnm

0 comments on commit 5da32e3

Please sign in to comment.