From 6d00dec84ca7a648d694e8383b7799eef4ae406f Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 26 May 2025 07:14:25 -0700 Subject: streams: seek-stream must fail on extracted string out stream. * stream.c (string_out_seek): Do the extracted error check so that we fail if the data has already been removed form the stream. There is a test case already for this, which is failing. --- stream.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stream.c b/stream.c index 03269dd6..0fbca432 100644 --- a/stream.c +++ b/stream.c @@ -2612,6 +2612,9 @@ static val string_out_seek(val stream, val off, enum strm_whence whence) val self = lit("seek-stream"); val pos, len = nil; + if (so->buf == 0) + string_out_extracted_error(stream); + while (so->head != so->tail) string_out_byte_flush(so, stream); -- cgit v1.2.3