Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
4c4a0875
Commit
4c4a0875
authored
Sep 19, 2012
by
Jörg Höhle
Committed by
Alexandre Julliard
Oct 25, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mciseq: Fix reading MCI_INFO_NAME and COPYRIGHT from MIDI file.
parent
3c640b8d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
13 deletions
+10
-13
mcimidi.c
dlls/mciseq/mcimidi.c
+10
-13
No files found.
dlls/mciseq/mcimidi.c
View file @
4c4a0875
...
...
@@ -347,10 +347,7 @@ static DWORD MIDI_mciReadMTrk(WINE_MCIMIDI* wmm, MCI_MIDITRACK* mmt)
switch
(
LOWORD
(
mmt
->
dwEventData
))
{
case
0x02FF
:
case
0x03FF
:
/* position after meta data header */
mmioSeek
(
wmm
->
hFile
,
mmt
->
dwIndex
+
HIWORD
(
mmt
->
dwEventData
),
SEEK_SET
);
len
=
mmt
->
wEventLength
-
HIWORD
(
mmt
->
dwEventData
);
if
(
len
>=
sizeof
(
buf
))
{
WARN
(
"Buffer for text is too small (%u are needed)
\n
"
,
len
);
len
=
sizeof
(
buf
)
-
1
;
...
...
@@ -361,20 +358,20 @@ static DWORD MIDI_mciReadMTrk(WINE_MCIMIDI* wmm, MCI_MIDITRACK* mmt)
case
0x02
:
if
(
wmm
->
lpstrCopyright
)
{
WARN
(
"Two copyright notices (%s|%s)
\n
"
,
debugstr_w
(
wmm
->
lpstrCopyright
),
buf
);
}
else
{
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
buf
,
-
1
,
NULL
,
0
);
wmm
->
lpstrCopyright
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_ACP
,
0
,
buf
,
-
1
,
wmm
->
lpstrCopyright
,
len
);
HeapFree
(
GetProcessHeap
(),
0
,
wmm
->
lpstrCopyright
);
}
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
buf
,
-
1
,
NULL
,
0
);
wmm
->
lpstrCopyright
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_ACP
,
0
,
buf
,
-
1
,
wmm
->
lpstrCopyright
,
len
);
break
;
case
0x03
:
if
(
wmm
->
lpstrName
)
{
WARN
(
"Two names (%s|%s)
\n
"
,
debugstr_w
(
wmm
->
lpstrName
),
buf
);
}
else
{
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
buf
,
-
1
,
NULL
,
0
);
wmm
->
lpstrName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_ACP
,
0
,
buf
,
-
1
,
wmm
->
lpstrName
,
len
);
}
HeapFree
(
GetProcessHeap
(),
0
,
wmm
->
lpstrName
);
}
/* last name or name from last track wins */
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
buf
,
-
1
,
NULL
,
0
);
wmm
->
lpstrName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_ACP
,
0
,
buf
,
-
1
,
wmm
->
lpstrName
,
len
);
break
;
}
}
...
...
@@ -1524,7 +1521,7 @@ static DWORD MIDI_mciInfo(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_INFO_PARMSW lp
case
MCI_INFO_NAME
:
str
=
wmm
->
lpstrName
;
break
;
default:
WARN
(
"Don't know this info command (%u)
\n
"
,
dwFlags
);
return
MCIERR_
UNRECOGNIZED_COMMAND
;
return
MCIERR_
MISSING_PARAMETER
;
/* not MCIERR_FLAGS_... */
}
if
(
!
ret
)
{
if
(
lpParms
->
dwRetSize
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment