sysio: got rid of now unnecessary length check

This commit is contained in:
Araq
2011-12-31 11:35:40 +01:00
parent c463a22dc9
commit 05fd30df43

View File

@@ -112,8 +112,6 @@ proc rawFileSize(file: TFile): int =
proc readAllFile(file: TFile, len: int): string =
# We aquire the filesize beforehand and hope it doesn't change.
# Speeds things up.
if len >= high(int):
raiseEIO("file too big to fit in memory")
result = newString(int(len))
if readBuffer(file, addr(result[0]), int(len)) != len:
raiseEIO("error while reading from file")