Author: akhaldi
Date: Sun May 11 16:47:56 2014
New Revision: 63233
URL:
http://svn.reactos.org/svn/reactos?rev=63233&view=rev
Log:
[CRT]
* Update _mktemp().
* Fixes some msvcrt tests.
CORE-8080
Modified:
trunk/reactos/lib/sdk/crt/stdio/file.c
Modified: trunk/reactos/lib/sdk/crt/stdio/file.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdio/file.c?r…
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdio/file.c [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/stdio/file.c [iso-8859-1] Sun May 11 16:47:56 2014
@@ -1403,9 +1403,12 @@
int id;
char letter = 'a';
+ if(!pattern)
+ return NULL;
+
while(*pattern)
numX = (*pattern++ == 'X')? numX + 1 : 0;
- if (numX < 5)
+ if (numX < 6)
return NULL;
pattern--;
id = GetCurrentProcessId();
@@ -1420,8 +1423,7 @@
do
{
*pattern = letter++;
- if (GetFileAttributesA(retVal) == INVALID_FILE_ATTRIBUTES &&
- GetLastError() == ERROR_FILE_NOT_FOUND)
+ if (GetFileAttributesA(retVal) == INVALID_FILE_ATTRIBUTES)
return retVal;
} while(letter <= 'z');
return NULL;