Fix incorrect size of resulting string in fromUtf8Array() (#1011)

This commit is contained in:
Nikolay Igotti
2017-11-07 19:55:51 +01:00
committed by GitHub
parent a90cf10631
commit e2fc1ddb53
+1 -1
View File
@@ -728,7 +728,7 @@ OBJ_GETTER(Kotlin_String_fromUtf8Array, KConstRef thiz, KInt start, KInt size) {
}
const char* rawString =
reinterpret_cast<const char*>(ByteArrayAddressOfElementAt(array, start));
RETURN_RESULT_OF(utf8ToUtf16, rawString, array->count_);
RETURN_RESULT_OF(utf8ToUtf16, rawString, size);
}
OBJ_GETTER(Kotlin_String_toUtf8Array, KString thiz, KInt start, KInt size) {