fixed bugs in types, added more tests
This commit is contained in:
1 parent
0e8f3daf99
commit
0b1cd2d9cf
5 files changed
+70
-14
No files matched your search
@@ -13,7 +13,7 @@ fun longToBytes(value: Long): ByteArray {
|
||||
|
||||
fun intToBytes(value: Int): ByteArray {
|
||||
var l = value
|
||||
val result = ByteArray(8)
|
||||
val result = ByteArray(4)
|
||||
for (i in 3 downTo 0) {
|
||||
result[i] = (l and 0xFF).toByte()
|
||||
l = l shr 8
|
||||
|
||||
Reference in new issue
Block a user