Sync GetTempFileNameW to wine HEAD

svn path=/trunk/; revision=27635
This commit is contained in:
Thomas Bluemel 2007-07-13 20:23:26 +00:00
parent 532f7fecc5
commit 8acdce6856

View file

@ -1183,7 +1183,7 @@ UINT WINAPI GetTempFileNameW( LPCWSTR path, LPCWSTR prefix, UINT unique, LPWSTR
int i; int i;
LPWSTR p; LPWSTR p;
if ( !path || !prefix || !buffer ) if ( !path || !buffer )
{ {
SetLastError( ERROR_INVALID_PARAMETER ); SetLastError( ERROR_INVALID_PARAMETER );
return 0; return 0;
@ -1195,6 +1195,7 @@ UINT WINAPI GetTempFileNameW( LPCWSTR path, LPCWSTR prefix, UINT unique, LPWSTR
/* add a \, if there isn't one */ /* add a \, if there isn't one */
if ((p == buffer) || (p[-1] != '\\')) *p++ = '\\'; if ((p == buffer) || (p[-1] != '\\')) *p++ = '\\';
if ( prefix )
for (i = 3; (i > 0) && (*prefix); i--) *p++ = *prefix++; for (i = 3; (i > 0) && (*prefix); i--) *p++ = *prefix++;
unique &= 0xffff; unique &= 0xffff;