diff --git a/Sources/SolanaSwift/Extensions/Data+Extensions.swift b/Sources/SolanaSwift/Extensions/Data+Extensions.swift index a560396e3..f7dd41221 100644 --- a/Sources/SolanaSwift/Extensions/Data+Extensions.swift +++ b/Sources/SolanaSwift/Extensions/Data+Extensions.swift @@ -18,12 +18,12 @@ public extension Data { } mutating func decodeLength() -> Int { - var len: UInt8 = 0 - var size: UInt8 = 0 + var len: Int = 0 + var size: Int = 0 while true { guard let elem = bytes.first else { break } _ = popFirst() - len |= (elem & 0x7F) << (size * 7) + len |= (Int(elem) & 0x7F) << (size * 7) size += 1 if elem & 0x80 == 0 { break