From: =?utf-8?b?0L3QsNCx?= <nabijaczleweli@nabijaczleweli.xyz>
Date: Sat, 25 Jan 2025 17:55:26 +0100
Subject: ttyplay: don't use uninitialised memory on partial header read

---
 io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/io.c b/io.c
index 63321a5..2613d66 100644
--- a/io.c
+++ b/io.c
@@ -57,7 +57,7 @@ int read_header(FILE *fp, Header *h)
 {
     uint32_t buf[3];
 
-    if (fread_wrapper(buf, sizeof(uint32_t), 3, fp) == 0)
+    if (fread_wrapper(buf, sizeof(uint32_t), 3, fp) != 3)
     {
         return 0;
     }
