Skip to content

Commit f005e53

Browse files
committed
Fix off by one error
Check for readBytes being less than 0, not -1
1 parent 439b692 commit f005e53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/FoundationEssentials/FileManager/FileManager+Basics.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ internal struct _FileManagerImpl {
277277
return false
278278
}
279279
}
280-
if readBytes < -1 { return false }
280+
if readBytes < 0 { return false }
281281
return true
282282
}
283283
}

0 commit comments

Comments
 (0)