diff --git a/core/src/main/resources/org/teavm/backend/c/runtime.c b/core/src/main/resources/org/teavm/backend/c/runtime.c index 8027981b6..1e60cb3ca 100644 --- a/core/src/main/resources/org/teavm/backend/c/runtime.c +++ b/core/src/main/resources/org/teavm/backend/c/runtime.c @@ -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);