mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Fix bug in base64 encoder
This commit is contained in:
parent
a39e6eb47e
commit
f14990eaeb
|
@ -118,9 +118,9 @@ public final class Base64Impl {
|
||||||
int j;
|
int j;
|
||||||
for (j = 0; j < triples;) {
|
for (j = 0; j < triples;) {
|
||||||
output[i++] = encode((byte) (data[j] >>> 2));
|
output[i++] = encode((byte) (data[j] >>> 2));
|
||||||
output[i++] = encode((byte) ((data[j] << 4) | (data[j + 1] >>> 4)));
|
output[i++] = encode((byte) ((data[j] << 4) | ((data[j + 1] & 0xFF) >>> 4)));
|
||||||
++j;
|
++j;
|
||||||
output[i++] = encode((byte) ((data[j] << 2) | (data[j + 1] >>> 6)));
|
output[i++] = encode((byte) ((data[j] << 2) | ((data[j + 1] & 0xFF) >>> 6)));
|
||||||
++j;
|
++j;
|
||||||
output[i++] = encode(data[j]);
|
output[i++] = encode(data[j]);
|
||||||
++j;
|
++j;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user