diff options
author | Anatol Belski <ab@php.net> | 2016-07-29 02:13:06 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2016-07-29 02:41:00 +0200 |
commit | 41d172d20f3c010f43468b1be3e32826fec0fa31 (patch) | |
tree | e9059ef2647cede8de1dd1fb946e03c88c9fe848 /win32/ioutil.c | |
parent | 09b5a453c1915b84b46e1c6e5687a2e1bc5bad22 (diff) | |
download | php-git-41d172d20f3c010f43468b1be3e32826fec0fa31.tar.gz |
fix and improve the ioutil cwd routine for nts
- move intermediate var to stack
- fix length calculation
- improve error code setting
Diffstat (limited to 'win32/ioutil.c')
-rw-r--r-- | win32/ioutil.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/win32/ioutil.c b/win32/ioutil.c index fc4413b2dd..b661a150af 100644 --- a/win32/ioutil.c +++ b/win32/ioutil.c @@ -425,6 +425,7 @@ PW32IO wchar_t *php_win32_ioutil_getcwd_w(const wchar_t *buf, int len) if (!GetCurrentDirectoryW(len, buf)) { err = GetLastError(); SET_ERRNO_FROM_WIN32_CODE(err); + return NULL; } return (wchar_t *)buf; |