mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 13:38:49 +03:00
Improve code - TU passed
This commit is contained in:
parent
9bb4c7ed25
commit
ceab0903cf
1 changed files with 4 additions and 4 deletions
|
@ -94,11 +94,11 @@ fun String.toQrCodeData(): QrCodeData? {
|
|||
val mode = byteArray[cursor].toInt()
|
||||
cursor++
|
||||
|
||||
// Get transaction length
|
||||
val bigEndian1 = byteArray[cursor].toUnsignedInt()
|
||||
val bigEndian2 = byteArray[cursor + 1].toUnsignedInt()
|
||||
// Get transaction length, Big Endian format
|
||||
val msb = byteArray[cursor].toUnsignedInt()
|
||||
val lsb = byteArray[cursor + 1].toUnsignedInt()
|
||||
|
||||
val transactionLength = bigEndian1 * 0x0100 + bigEndian2
|
||||
val transactionLength = msb.shl(8) + lsb
|
||||
|
||||
cursor++
|
||||
cursor++
|
||||
|
|
Loading…
Reference in a new issue