Author: weiden
Date: Sat Jul 14 00:23:26 2007
New Revision: 27635
URL:
http://svn.reactos.org/svn/reactos?rev=27635&view=rev
Log:
Sync GetTempFileNameW to wine HEAD
Modified:
trunk/reactos/dll/win32/kernel32/file/file.c
Modified: trunk/reactos/dll/win32/kernel32/file/file.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/fi…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/file/file.c (original)
+++ trunk/reactos/dll/win32/kernel32/file/file.c Sat Jul 14 00:23:26 2007
@@ -1183,7 +1183,7 @@
int i;
LPWSTR p;
- if ( !path || !prefix || !buffer )
+ if ( !path || !buffer )
{
SetLastError( ERROR_INVALID_PARAMETER );
return 0;
@@ -1195,7 +1195,8 @@
/* add a \, if there isn't one */
if ((p == buffer) || (p[-1] != '\\')) *p++ = '\\';
- for (i = 3; (i > 0) && (*prefix); i--) *p++ = *prefix++;
+ if ( prefix )
+ for (i = 3; (i > 0) && (*prefix); i--) *p++ = *prefix++;
unique &= 0xffff;