Skip to content

Commit

Permalink
Update open file process
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Liu <andy@madmachine.io>
  • Loading branch information
andy0808 committed Nov 13, 2023
1 parent 01a10ab commit 44a9f89
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,7 @@ struct PongGame {
func readSoundData(from path: String) -> [UInt8] {
let headerSize = 0x2C

let _file = try? FileDescriptor.open(path)
guard let file = _file else {
guard let file = try? FileDescriptor.open(path) else {
print("Read sound data \(path) failed!")
return []
}
Expand Down

0 comments on commit 44a9f89

Please sign in to comment.