20 Aug
2007
20 Aug
'07
10:53 a.m.
"Mikolaj Zalewski" <mikolajz(a)google.com> writes:
@@ -302,9 +302,28 @@ BOOL create_fake_dll( const WCHAR *name, else { h = CreateFileW( name, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, NULL ); + + if (h == INVALID_HANDLE_VALUE && GetLastError() == ERROR_PATH_NOT_FOUND) + { + WCHAR *pathel; + + /* create the directory/directories */ + pathel = strchrW(name, '\\'); + while (pathel != NULL) + { + *pathel = 0;
You shouldn't write to the name, it's a const pointer, even if strchrW hides the warning. -- Alexandre Julliard julliard(a)winehq.org