Archived
1
0
Fork 0

Fixed deprecated usage of readChars

This commit is contained in:
Julien Dessaux 2022-01-28 18:07:07 +01:00
parent 98fe417488
commit f8b15bb7c7
Signed by: adyxax
GPG key ID: F92E51B86E07177E

View file

@ -79,7 +79,7 @@ proc Load*(filename: string): ref Field =
var data: array[4096, char]
var lastReadIsCR = false
while true:
let n = file.readChars(data, 0, 4096)
let n = file.readChars(data)
if n <= 0:
if f.lines.len == 0:
if l == nil: # we got en empty file!