From 35a33c7d24422530ea9ae81c4b81de3fa0cce328 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Fri, 6 Feb 2026 06:04:41 +0000 Subject: [PATCH] stream: stream_substr's call to stream_seek_forward refactored Following stream_seek_forward's own refactor, where we get offsets back instead of just a boolean, we should verify that offset. --- src/stream.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stream.c b/src/stream.c index f6f0ef6..b332275 100644 --- a/src/stream.c +++ b/src/stream.c @@ -317,11 +317,11 @@ sv_t stream_substr(stream_t *stream, u64 size) // See if I can go forward enough to make this substring u64 current_position = stream->position; - bool successful = stream_seek_forward(stream, size); + u64 successful = stream_seek_forward(stream, size); // Reset the position in either situation stream->position = current_position; - if (!successful) + if (successful != size) return SV(NULL, 0); char *ptr = NULL;