mirror of
https://github.com/konsoletyper/teavm.git
synced 2024-11-21 01:00:54 +08:00
C: fix bug in conversion from char16 C string to Java string
This commit is contained in:
parent
a2b6c2be58
commit
da27628e19
@ -413,7 +413,7 @@ TeaVM_String* teavm_c16ToString(char16_t* cstring) {
|
||||
}
|
||||
|
||||
int32_t size = 0;
|
||||
while (cstring[size] == 0) {
|
||||
while (cstring[size] != 0) {
|
||||
++size;
|
||||
}
|
||||
TeaVM_Array* charArray = teavm_allocateCharArray(size);
|
||||
|
Loading…
Reference in New Issue
Block a user