mirror of
https://github.com/jlengrand/ktor.git
synced 2026-03-10 08:31:20 +00:00
Fix Short.highByte always return 0
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user