ui.tools.listener: fix stream-read-unsafe
It was returning the number of requested bytes even if eof was encountered.db4
parent
6f12322bda
commit
c3c382e45c
|
@ -152,8 +152,9 @@ M: interactor stream-readln
|
|||
|
||||
M:: interactor stream-read-unsafe ( n buf interactor -- count )
|
||||
n [ 0 ] [
|
||||
drop
|
||||
interactor interactor-read dup [ "\n" join ] when
|
||||
n short head-slice 0 buf copy
|
||||
n short [ head-slice 0 buf copy ] keep
|
||||
] if-zero ;
|
||||
|
||||
M: interactor stream-read-partial-unsafe
|
||||
|
|
Loading…
Reference in New Issue