diff --git a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/ir2wasm/ConstantData.kt b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/ir2wasm/ConstantData.kt index be67f2684a6..2c6060dd5ac 100644 --- a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/ir2wasm/ConstantData.kt +++ b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/ir2wasm/ConstantData.kt @@ -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()) } \ No newline at end of file