From 79fb536822381b8e0d53eed1d36d7b447b053161 Mon Sep 17 00:00:00 2001 From: Geraint Luff Date: Thu, 6 Feb 2025 20:06:14 +0000 Subject: [PATCH] Add missing fix for `wav.h` --- cmd/util/wav.h | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/util/wav.h b/cmd/util/wav.h index a2396c8..2a716a4 100644 --- a/cmd/util/wav.h +++ b/cmd/util/wav.h @@ -131,6 +131,7 @@ public: Format format = Format::PCM; // Shouldn't matter, we should always read the `fmt ` chunk before `data` while (!file.eof()) { auto blockType = read32(file), blockLength = read32(file); + if (file.eof()) break; if (!hasFormat && blockType == value_fmt) { auto formatInt = read16(file); format = (Format)formatInt;