From 5a78b01a5788b63048216506440f9c17ad269ca3 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Fri, 6 Feb 2026 04:52:49 +0000 Subject: [PATCH] test_stream: don't write null terminator to mock file --- test/test_stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_stream.c b/test/test_stream.c index 26113d2..01eb58c 100644 --- a/test/test_stream.c +++ b/test/test_stream.c @@ -44,7 +44,7 @@ void stream_test_prologue(void) // 1) Create a file, or clear the contents of it if it exists already. // 2) Write some content to it. assert(valid_fp); - fwrite(words_text, ARRSIZE(words_text), 1, valid_fp); + fwrite(words_text, ARRSIZE(words_text) - 1, 1, valid_fp); fclose(valid_fp); valid_fp = fopen(valid_filename, "rb"); assert(valid_fp);