Skip to content

Commit

Permalink
Fix compiling.
Browse files Browse the repository at this point in the history
  • Loading branch information
Extollite committed Sep 19, 2020
1 parent 515217f commit 1bec70f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/RakNetSwift/Utils/NIOHelpers/ByteBuffer-uint24.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ extension ByteBuffer {
@discardableResult
@inlinable
public mutating func writeUInt24(_ value : UInt32) -> Int{
self.writeInteger(UInt8(truncatingIfNeeded: value)!)
self.writeInteger(UInt8(truncatingIfNeeded: value >> 8)!)
self.writeInteger(UInt8(truncatingIfNeeded: value >> 16)!)
self.writeInteger(UInt8(truncatingIfNeeded: value))
self.writeInteger(UInt8(truncatingIfNeeded: value >> 8))
self.writeInteger(UInt8(truncatingIfNeeded: value >> 16))
return Int(3)
}

Expand Down

0 comments on commit 1bec70f

Please sign in to comment.