fixes #5392
This commit is contained in:
parent
55782205a4
commit
1811e51ff5
1 changed files with 4 additions and 1 deletions
|
|
@ -215,7 +215,10 @@ proc rawFileSize(file: File): int =
|
|||
discard c_fseek(file, clong(oldPos), 0)
|
||||
|
||||
proc endOfFile(f: File): bool =
|
||||
result = c_feof(f) != 0
|
||||
var c = c_fgetc(f)
|
||||
discard c_ungetc(c, f)
|
||||
return c < 0'i32
|
||||
#result = c_feof(f) != 0
|
||||
|
||||
proc readAllFile(file: File, len: int): string =
|
||||
# We acquire the filesize beforehand and hope it doesn't change.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue