Commit 736cd603 authored by Sasha Slijepcevic's avatar Sasha Slijepcevic Committed by Alexandre Julliard

msvcrt: In _tempnam, if TMP is set, it has a precedence over the

parameter dir.
parent 917a801d
......@@ -1887,6 +1887,9 @@ __int64 _telli64(int fd)
char *_tempnam(const char *dir, const char *prefix)
{
char tmpbuf[MAX_PATH];
const char *tmp_dir = MSVCRT_getenv("TMP");
if (tmp_dir) dir = tmp_dir;
TRACE("dir (%s) prefix (%s)\n",dir,prefix);
if (GetTempFileNameA(dir,prefix,0,tmpbuf))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment