diff --git a/Sources/PlaydateKit/Core/File.swift b/Sources/PlaydateKit/Core/File.swift index 973a88e8..02f559f5 100644 --- a/Sources/PlaydateKit/Core/File.swift +++ b/Sources/PlaydateKit/Core/File.swift @@ -63,7 +63,7 @@ public enum File { buffer: UnsafeRawBufferPointer ) throws(Playdate.Error) -> CInt { let writtenCount = file.write.unsafelyUnwrapped(pointer, buffer.baseAddress, CUnsignedInt(buffer.count)) - guard writtenCount != 1 else { throw lastError } + guard writtenCount != -1 else { throw lastError } return writtenCount }