Hi, I have a question about ByteArray and toMutabl...
# kotlin-native
r
Hi, I have a question about ByteArray and toMutableList() method, on new Kotlin 1.3.50 when i do (in Common):
Copy code
val bytes = byteArrayOf(1)
val mutableBytes = bytes.toMutableList()
It works fine, but if a byteArray contains negative value i got a crash on iOS (on Android works fine). It's easy to reproduce, example:
Copy code
val bytes = byteArrayOf(-1)
val mutableBytes = bytes.toMutableList() /* got a crash here on iOS */
Does anybody have this issue?
l
Can you report it in Kotlin/Native's GitHub issues?
a
Hello @Rostislav Utrobin! This problem looks similar to this one: https://github.com/JetBrains/kotlin-native/issues/3290 Please try to use the workaround described in the discussion.
r
Please try to use the workaround described in the discussion. - Thanks for reply, but the solution didn't help
Created the issue in Kotlin/Native's GitHub: https://github.com/JetBrains/kotlin-native/issues/3355
a
Can you confirm that workaround made no help here? I have reproduced the issue with the same conditions, and it was gone as I corrected the
konan.properties
.