ui.tools.listener: fix stream-read-unsafe

It was returning the number of requested bytes even if eof was encountered.
db4
Joe Groff 2011-10-13 14:51:16 -07:00
parent 6f12322bda
commit c3c382e45c
1 changed files with 2 additions and 1 deletions

View File

@ -152,8 +152,9 @@ M: interactor stream-readln
M:: interactor stream-read-unsafe ( n buf interactor -- count ) M:: interactor stream-read-unsafe ( n buf interactor -- count )
n [ 0 ] [ n [ 0 ] [
drop
interactor interactor-read dup [ "\n" join ] when interactor interactor-read dup [ "\n" join ] when
n short head-slice 0 buf copy n short [ head-slice 0 buf copy ] keep
] if-zero ; ] if-zero ;
M: interactor stream-read-partial-unsafe M: interactor stream-read-partial-unsafe