Commit 76848805 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

dmusic: Reset riff chunk type to 0 when it is invalid.

parent 52d3f7ab
......@@ -338,11 +338,10 @@ HRESULT stream_get_chunk(IStream *stream, struct chunk_entry *chunk)
}
}
if (chunk->id == FOURCC_LIST || chunk->id == FOURCC_RIFF) {
hr = stream_read(stream, &chunk->type, sizeof(FOURCC));
if (hr != S_OK)
return hr != S_FALSE ? hr : E_FAIL;
}
if (chunk->id != FOURCC_LIST && chunk->id != FOURCC_RIFF)
chunk->type = 0;
else if ((hr = stream_read(stream, &chunk->type, sizeof(FOURCC))) != S_OK)
return hr != S_FALSE ? hr : E_FAIL;
TRACE_(dmfile)("Returning %s\n", debugstr_chunk(chunk));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment