diff options
author | Araq <rumpf_a@web.de> | 2017-02-16 11:18:10 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2017-02-16 11:18:10 +0100 |
commit | c9dd6908ae461e7996193d31eaab6ec0a1fd701b (patch) | |
tree | 240007da9047c0a509658964b37b24da7f361e57 /lib/system/sysio.nim | |
parent | 01c785e0aa2f2b7f36aa51c34bbedfbf2e74fb39 (diff) | |
parent | 6499462303f1e4ccc8e9a3174985f563e688f566 (diff) | |
download | Nim-c9dd6908ae461e7996193d31eaab6ec0a1fd701b.tar.gz |
resolved conflict
Diffstat (limited to 'lib/system/sysio.nim')
-rw-r--r-- | lib/system/sysio.nim | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/system/sysio.nim b/lib/system/sysio.nim index fa1bdbb4e..7444661e3 100644 --- a/lib/system/sysio.nim +++ b/lib/system/sysio.nim @@ -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. |