Hi,

somehow stream-read-until seems to be broken for byte-reader:

B{ 120 0 0 0 0 0 0 } binary [ "\0" read-until ] with-byte-reader

results in

B{ 120 }
0

on the stack..

If there were other values read from the stream before:

B{ 0 120 0 0 0 0 0 0 } binary [ 1 read drop "\0" read-until ] with-byte-reader

the result is

B{ 120 0 }
0

>From my understanding the bug is in using sequence-read ( or better
(sequence-read) ).

There the found position of the separator ("\0" in my example) is
added as length ( add-length ) which results in to many bytes being
read.

So basically, stream-read-until currently only works for byte-reader
when no other content was read before and produces unexpected behavior
otherwise.

Sascha
-- 
Through the darkness of future past
the magician longs to see
One chants out between two worlds
Fire walk with me.

------------------------------------------------------------------------------
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to