Fix Short.highByte always return 0

This commit is contained in:
大鼠四
2020-02-06 15:25:21 +03:00
committed by Leonid Stashevsky
parent 2d497df355
commit 32f95de2ea

View File

@@ -46,7 +46,7 @@ fun UInt.reverseByteOrder(): UInt = toInt().reverseByteOrder().toUInt()
fun ULong.reverseByteOrder(): ULong = toLong().reverseByteOrder().toULong()
@ExperimentalIoApi
inline val Short.highByte: Byte get() = ((toInt() and 0xff) shr 8).toByte()
inline val Short.highByte: Byte get() = (toInt() ushr 8).toByte()
@ExperimentalIoApi
inline val Short.lowByte: Byte get() = (toInt() and 0xff).toByte()