From da27628e1906ee6d14aabb28dd8e6e70805e976e Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Wed, 26 Jun 2019 15:26:13 +0300 Subject: [PATCH] C: fix bug in conversion from char16 C string to Java string --- core/src/main/resources/org/teavm/backend/c/runtime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);