mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-04 04:02:41 +00:00
don't reuse code from 0.18.0
This commit is contained in:
@@ -145,15 +145,8 @@ proc readLine(f: File, line: var TaintedString): bool =
|
||||
var pos = 0
|
||||
|
||||
# Use the currently reserved space for a first try
|
||||
var sp = line.string.len
|
||||
if sp == 0:
|
||||
sp = 80
|
||||
line.string.setLen(sp)
|
||||
else:
|
||||
when not defined(nimscript):
|
||||
sp = cint(cast[PGenericSeq](line.string).space)
|
||||
else:
|
||||
line.string.setLen(sp + 1)
|
||||
var sp = max(line.string.len, 80)
|
||||
line.string.setLen(sp)
|
||||
|
||||
while true:
|
||||
# memset to \L so that we can tell how far fgets wrote, even on EOF, where
|
||||
|
||||
Reference in New Issue
Block a user