diff options
author | Dmitry Atamanov <data-man@users.noreply.github.com> | 2018-04-06 11:09:05 +0300 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-04-06 10:09:05 +0200 |
commit | cf6d41b51d707452d3f2d193d3cf7d9767a15fce (patch) | |
tree | 36cd64a8f384fe4fa1c3096828be6dd6c0f847b2 /lib | |
parent | 4d6456d029964153cc9cb99a06ebbe13ffb15ef5 (diff) | |
download | Nim-cf6d41b51d707452d3f2d193d3cf7d9767a15fce.tar.gz |
Fixes #5281 (#7489)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/streams.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/pure/streams.nim b/lib/pure/streams.nim index 025a534c5..8fb14b6f6 100644 --- a/lib/pure/streams.nim +++ b/lib/pure/streams.nim @@ -321,6 +321,8 @@ proc readLine*(s: Stream): TaintedString = ## Reads a line from a stream `s`. Note: This is not very efficient. Raises ## `EIO` if an error occurred. result = TaintedString"" + if s.atEnd: + raise newEIO("cannot read from stream") while true: var c = readChar(s) if c == '\c': |