From 4803271115a07f5665c1562cb8cb55171c57474d Mon Sep 17 00:00:00 2001 From: AlexandreRouma Date: Sun, 29 Oct 2023 02:27:19 +0100 Subject: [PATCH] fix #1212 --- core/src/utils/riff.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/utils/riff.cpp b/core/src/utils/riff.cpp index 9074badc..479a141a 100644 --- a/core/src/utils/riff.cpp +++ b/core/src/utils/riff.cpp @@ -91,9 +91,9 @@ namespace riff { file.write((char*)&desc.hdr.size, sizeof(desc.hdr.size)); file.seekp(pos); - // If parent chunk, increment its size + // If parent chunk, increment its size by the size of the subchunk (adding the size of its header) if (!chunks.empty()) { - chunks.top().hdr.size += desc.hdr.size; + chunks.top().hdr.size += desc.hdr.size + 8; } }