Skip to content

Commit

Permalink
Make Xcode 16 happy
Browse files Browse the repository at this point in the history
  • Loading branch information
lemonmojo committed Sep 18, 2024
1 parent 8b2cb02 commit 269b329
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions RoyalVNCKit/Compression/ZlibInflateStream.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,12 @@ class ZlibInflateStream {
streamPtr.pointee.zfree = nil

var version = ZLIB_VERSION

let status = zlib.inflateInit_(streamPtr, &version, .init(MemoryLayout<z_stream>.size))

var status = Z_VERSION_ERROR

withUnsafeMutablePointer(to: &version) { versionPtr in
status = zlib.inflateInit_(streamPtr, versionPtr, .init(MemoryLayout<z_stream>.size))
}

guard ZlibError.isSuccess(status) else {
throw Self.error(streamPtr: streamPtr,
status: status)
Expand Down

0 comments on commit 269b329

Please sign in to comment.