Fixed null ptr deref introduced in last patch.

This commit is contained in:
Eric Pouech 1999-06-26 10:30:11 +00:00 committed by Alexandre Julliard
parent 102e1f46e2
commit 62ad0418b4
1 changed files with 4 additions and 2 deletions

View File

@ -2554,11 +2554,13 @@ DWORD WINAPI mciSendString16(LPCSTR lpstrCommand, LPSTR lpstrReturnString,
}
*dev++ = '\0';
args = strchr(dev, ' ');
if (args != NULL) *args = '\0';
while (*++args == ' ');
if (args != NULL) {
char *s;
*args = '\0';
while (*++args == ' ');
i = 1;/* nrofkeywords = nrofspaces+1 */
s = args;
while ((s = strchr(s, ' ')) != NULL) {