From 3a7f02075e2b613932b3673486b5538373232603 Mon Sep 17 00:00:00 2001 From: Aki Date: Thu, 25 Feb 2021 21:25:59 +0100 Subject: Fixed comparison and extended example --- stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stream.c') diff --git a/stream.c b/stream.c index cf92ad3..a4fb8c8 100644 --- a/stream.c +++ b/stream.c @@ -114,7 +114,7 @@ static int until(struct buffer * b, const char * pattern, const int pattern_leng { int offset = b->offset; - while (offset + pattern_length < b->length) + while (offset + pattern_length <= b->length) { if (0 == strncmp(&b->data[offset], pattern, pattern_length)) { -- cgit v1.1