C: fix bug in conversion from char16 C string to Java string

This commit is contained in:
Alexey Andreev 2019-06-26 15:26:13 +03:00
parent a2b6c2be58
commit da27628e19

View File

@ -413,7 +413,7 @@ TeaVM_String* teavm_c16ToString(char16_t* cstring) {
} }
int32_t size = 0; int32_t size = 0;
while (cstring[size] == 0) { while (cstring[size] != 0) {
++size; ++size;
} }
TeaVM_Array* charArray = teavm_allocateCharArray(size); TeaVM_Array* charArray = teavm_allocateCharArray(size);