avoid crash on EOF at end
This commit is contained in:
parent
e6d741af79
commit
b021e2322f
1 changed files with 1 additions and 1 deletions
|
@ -270,7 +270,7 @@ hGetLineUntilExitOrEOF ph h = go []
|
|||
Just _ -> finalcheck buf
|
||||
|
||||
finalcheck buf = do
|
||||
ready <- hWaitForInput h 0
|
||||
ready <- waitforinputorerror 0
|
||||
if ready
|
||||
then getloop buf finalcheck
|
||||
-- No remaining buffered input, though the handle
|
||||
|
|
Loading…
Reference in a new issue