diff --git a/teavm-classlib/src/main/java/org/teavm/classlib/impl/unicode/UnicodeSupport.java b/teavm-classlib/src/main/java/org/teavm/classlib/impl/unicode/UnicodeSupport.java index 225d6d2ae..296b99b0c 100644 --- a/teavm-classlib/src/main/java/org/teavm/classlib/impl/unicode/UnicodeSupport.java +++ b/teavm-classlib/src/main/java/org/teavm/classlib/impl/unicode/UnicodeSupport.java @@ -144,12 +144,12 @@ public class UnicodeSupport { int j = 0; int t = 0; while (true) { - if (i == a.length) { + if (j == b.length) { while (i < a.length) { result[t++] = a[i++]; } break; - } else if (j == b.length) { + } else if (i == a.length) { while (j < b.length) { result[t++] = b[j++]; }