mirror of
https://github.com/reactos/reactos.git
synced 2024-08-05 02:50:55 +00:00
[CRT]
* Update _wtmpnam() and tmpnam(). CORE-8080 svn path=/trunk/; revision=63417
This commit is contained in:
parent
ea89346b76
commit
6314cbc84d
|
@ -3718,6 +3718,7 @@ char * CDECL tmpnam(char *s)
|
||||||
{
|
{
|
||||||
size = int_to_base32(tmpnam_unique++, tmpstr);
|
size = int_to_base32(tmpnam_unique++, tmpstr);
|
||||||
memcpy(p, tmpstr, size);
|
memcpy(p, tmpstr, size);
|
||||||
|
p[size] = '\0';
|
||||||
if (GetFileAttributesA(s) == INVALID_FILE_ATTRIBUTES &&
|
if (GetFileAttributesA(s) == INVALID_FILE_ATTRIBUTES &&
|
||||||
GetLastError() == ERROR_FILE_NOT_FOUND)
|
GetLastError() == ERROR_FILE_NOT_FOUND)
|
||||||
break;
|
break;
|
||||||
|
@ -3749,6 +3750,7 @@ wchar_t * CDECL _wtmpnam(wchar_t *s)
|
||||||
{
|
{
|
||||||
size = int_to_base32_w(tmpnam_unique++, tmpstr);
|
size = int_to_base32_w(tmpnam_unique++, tmpstr);
|
||||||
memcpy(p, tmpstr, size*sizeof(wchar_t));
|
memcpy(p, tmpstr, size*sizeof(wchar_t));
|
||||||
|
p[size] = '\0';
|
||||||
if (GetFileAttributesW(s) == INVALID_FILE_ATTRIBUTES &&
|
if (GetFileAttributesW(s) == INVALID_FILE_ATTRIBUTES &&
|
||||||
GetLastError() == ERROR_FILE_NOT_FOUND)
|
GetLastError() == ERROR_FILE_NOT_FOUND)
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue