From 925f22f2c9fba2ca8cb52a14c7dc5f57fb92fd64 Mon Sep 17 00:00:00 2001 From: Cody Logan Date: Wed, 29 Nov 2023 14:22:01 -0800 Subject: Fix bug that could cause an unending loop in tests --- test-convert-markdown.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test-convert-markdown.c') diff --git a/test-convert-markdown.c b/test-convert-markdown.c index 936b118..e33383f 100644 --- a/test-convert-markdown.c +++ b/test-convert-markdown.c @@ -39,7 +39,7 @@ static int test_parse_file(const char *testname, const char *input, const char * char* result; size_t len = 0; do { - result = fgets(buffer + len, length - len, outstream); + result = fgets(buffer + len, length - len + 1, outstream); len = strlen(buffer); } while (result); fclose(instream); -- cgit v1.2.3