sysio: got rid of now unnecessary length check
This commit is contained in:
parent
c463a22dc9
commit
05fd30df43
1 changed files with 0 additions and 2 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue