Fix toKStringFromUtf32 (#3903)

Remove null terminator from returned String
This commit is contained in:
Dominic Fischer
2020-03-04 11:18:04 +00:00
committed by GitHub
parent 27307552e7
commit 7e9f8b5c8c
@@ -532,8 +532,8 @@ public fun CPointer<IntVar>.toKStringFromUtf32(): String {
var toIndex = 0
while (true) {
val value = nativeBytes[fromIndex++]
toIndex++
if (value == 0) break
toIndex++
if (value >= 0x10000 && value <= 0x10ffff) {
toIndex++
}