[PATCH] mciseq: Print data only when successfully read.
This may lead to a uninitialized use of twd otherwise. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> --- dlls/mciseq/mcimidi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/mciseq/mcimidi.c b/dlls/mciseq/mcimidi.c index 4211ed5ca4a..2d3c4975296 100644 --- a/dlls/mciseq/mcimidi.c +++ b/dlls/mciseq/mcimidi.c @@ -937,8 +937,8 @@ static DWORD MIDI_player(WINE_MCIMIDI* wmm, DWORD dwFlags) if (TRACE_ON(mcimidi)) { WORD twd; - MIDI_mciReadWord(wmm, &twd); /* == 0 */ - TRACE("Got sequence number %u\n", twd); + if (MIDI_mciReadWord(wmm, &twd)) WARN("Failed to read word\n"); + else TRACE("Got sequence number %u\n", twd); } break; case 0x01: /* any text */ -- 2.35.1
participants (1)
-
Rémi Bernon