Skip to content

Commit 4c6e9a2

Browse files
authored
Merge pull request swiftlang#1119 from gonzalolarralde/filehandle-remaining-t_off
2 parents 41db69e + 030e2cc commit 4c6e9a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Foundation/FileHandle.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ open class FileHandle : NSObject, NSSecureCoding {
7676
fatalError("Unable to fetch current file offset")
7777
}
7878
if off_t(statbuf.st_size) > offset {
79-
var remaining = size_t(statbuf.st_size - offset)
79+
var remaining = size_t(off_t(statbuf.st_size) - offset)
8080
remaining = min(remaining, size_t(length))
8181

8282
dynamicBuffer = malloc(remaining)

0 commit comments

Comments
 (0)