Fixed some bugs in MCI string parsing.
diff --git a/dlls/winmm/mci.c b/dlls/winmm/mci.c index e73b5de..0ec4ef7 100644 --- a/dlls/winmm/mci.c +++ b/dlls/winmm/mci.c
@@ -555,7 +555,7 @@ /************************************************************************** * 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; HKEY hKey; @@ -1031,7 +1031,6 @@ if (ptr[-1] == '\\') TRACE("Ooops: un-escaped \"\n"); *ptr++ = '\0'; /* remove trailing " */ if (*ptr != ' ' && *ptr != '\0') return MCIERR_EXTRA_CHARACTERS; - *ptr++ = '\0'; } else { ptr = strchrW(ptr, ' '); @@ -1093,7 +1092,7 @@ } 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[] */ args += len; while (*args == ' ') args++;