Fixed some bugs in MCI string parsing.
This commit is contained in:
parent
1cb1183037
commit
f01baaa9ab
|
@ -555,7 +555,7 @@ static DWORD MCI_UnmapMsgAtoW(UINT msg, DWORD_PTR dwParam1, DWORD_PTR dwParam2,
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* MCI_GetDevTypeFromFileName [internal]
|
* MCI_GetDevTypeFromFileName [internal]
|
||||||
*/
|
*/
|
||||||
static DWORD MCI_GetDevTypeFromFileName(LPCWSTR fileName, LPCWSTR buf, UINT len)
|
static DWORD MCI_GetDevTypeFromFileName(LPCWSTR fileName, LPWSTR buf, UINT len)
|
||||||
{
|
{
|
||||||
LPCWSTR tmp;
|
LPCWSTR tmp;
|
||||||
HKEY hKey;
|
HKEY hKey;
|
||||||
|
@ -1031,7 +1031,6 @@ static DWORD MCI_GetString(LPWSTR* str, LPWSTR* args)
|
||||||
if (ptr[-1] == '\\') TRACE("Ooops: un-escaped \"\n");
|
if (ptr[-1] == '\\') TRACE("Ooops: un-escaped \"\n");
|
||||||
*ptr++ = '\0'; /* remove trailing " */
|
*ptr++ = '\0'; /* remove trailing " */
|
||||||
if (*ptr != ' ' && *ptr != '\0') return MCIERR_EXTRA_CHARACTERS;
|
if (*ptr != ' ' && *ptr != '\0') return MCIERR_EXTRA_CHARACTERS;
|
||||||
*ptr++ = '\0';
|
|
||||||
} else {
|
} else {
|
||||||
ptr = strchrW(ptr, ' ');
|
ptr = strchrW(ptr, ' ');
|
||||||
|
|
||||||
|
@ -1093,7 +1092,7 @@ static DWORD MCI_ParseOptArgs(LPDWORD data, int _offset, LPCWSTR lpCmd,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strncmpiW(args, str, len) == 0 &&
|
if (strncmpiW(args, str, len) == 0 &&
|
||||||
(args[len] == 0 || args[len] == ' ')) {
|
((eid == MCI_STRING && len == 0) || args[len] == 0 || args[len] == ' ')) {
|
||||||
/* store good values into data[] */
|
/* store good values into data[] */
|
||||||
args += len;
|
args += len;
|
||||||
while (*args == ' ') args++;
|
while (*args == ' ') args++;
|
||||||
|
|
Loading…
Reference in New Issue