2008/10/2 Aric Stewart <aric(a)codeweavers.com>:
@@ -543,34 +543,50 @@ DWORD WINAPI VerInstallFileW( len = WideCharToMultiByte( CP_ACP, 0, srcfilename, -1, NULL, 0, NULL, NULL ); if ((wsrcf = HeapAlloc( GetProcessHeap(), 0, len ))) WideCharToMultiByte( CP_ACP, 0, srcfilename, -1, wsrcf, len, NULL, NULL ); + else if (len) + ret = VIF_OUTOFMEMORY;
IIRC HeapAlloc(..., 0) returns a non-NULL value, so the "if (len)" part is not needed. ...
+ rc = VerInstallFileA(0x0, "in.txt", "out.txt", "C:\\windows\\temp", "C:\\windows\\temp\\test\\", "C:\\", tmpname, &size); + ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08x/\'%s\'\n",rc,tmpname);
You shouldn't hard-code paths such as this. -- Rob Shearman