[WASM] Fix invalid string literal encoding

This commit is contained in:
Igor Yakovlev
2021-11-23 17:12:08 +01:00
committed by TeamCityServer
parent 34c6abe0bd
commit 2e78a1cd90
@@ -102,5 +102,5 @@ fun Int.toLittleEndianBytes(): ByteArray {
}
fun Char.toLittleEndianBytes(): ByteArray {
return byteArrayOf((this.code and 0xFF).toByte(), (this.code and 0xFF00).toByte())
return byteArrayOf((this.code and 0xFF).toByte(), (this.code ushr Byte.SIZE_BITS).toByte())
}