diff --git a/Mist/Extensions/Array+Extension.swift b/Mist/Extensions/Array+Extension.swift index c62895f..1dc93c7 100644 --- a/Mist/Extensions/Array+Extension.swift +++ b/Mist/Extensions/Array+Extension.swift @@ -11,13 +11,13 @@ extension Array { } func uInt32(at offset: Int) -> UInt32 { - self[offset...offset + 0x03].reversed().reduce(0) { + self[offset ... offset + 0x03].reversed().reduce(0) { $0 << 0x08 + UInt32($1) } } func uInt64(at offset: Int) -> UInt64 { - self[offset...offset + 0x07].reversed().reduce(0) { + self[offset ... offset + 0x07].reversed().reduce(0) { $0 << 0x08 + UInt64($1) } } diff --git a/Mist/Model/Chunklist.swift b/Mist/Model/Chunklist.swift index 8dc9af9..568320f 100644 --- a/Mist/Model/Chunklist.swift +++ b/Mist/Model/Chunklist.swift @@ -71,7 +71,7 @@ struct Chunklist { totalChunks = array.uInt64(at: 0x0C) chunksOffset = array.uInt64(at: 0x14) signatureOffset = array.uInt64(at: 0x1C) - chunks = Chunklist.chunks(Array(array[Int(chunksOffset).. [Chunk] { var chunks: [Chunk] = [] - for offset in 0..