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
|
Just _ -> finalcheck buf
|
||||||
|
|
||||||
finalcheck buf = do
|
finalcheck buf = do
|
||||||
ready <- hWaitForInput h 0
|
ready <- waitforinputorerror 0
|
||||||
if ready
|
if ready
|
||||||
then getloop buf finalcheck
|
then getloop buf finalcheck
|
||||||
-- No remaining buffered input, though the handle
|
-- No remaining buffered input, though the handle
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue