summaryrefslogtreecommitdiff
path: root/win32/ioutil.h
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2018-10-03 23:10:30 +0200
committerAnatol Belski <ab@php.net>2018-10-03 23:12:49 +0200
commit248c857a31b75865ac070b22a1fa711072be148e (patch)
tree8948a1accd279e17831884985d02ec6f28cb284a /win32/ioutil.h
parent14628f1c5dec3401043109a3d682cb462553cd88 (diff)
downloadphp-git-248c857a31b75865ac070b22a1fa711072be148e.tar.gz
Reuse delivered length
Fix length calculation
Diffstat (limited to 'win32/ioutil.h')
-rw-r--r--win32/ioutil.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/win32/ioutil.h b/win32/ioutil.h
index db21c449e0..e49b1050a0 100644
--- a/win32/ioutil.h
+++ b/win32/ioutil.h
@@ -774,7 +774,7 @@ __forceinline static ssize_t php_win32_ioutil_readlink(const char *path, char *b
return ret;
}
- ret_buf = php_win32_ioutil_conv_w_to_any(retw, PHP_WIN32_CP_IGNORE_LEN, &ret_buf_len);
+ ret_buf = php_win32_ioutil_conv_w_to_any(retw, ret, &ret_buf_len);
if (!ret_buf || ret_buf_len >= buf_len || ret_buf_len >= MAXPATHLEN) {
free(pathw);
SET_ERRNO_FROM_WIN32_CODE(ERROR_BAD_PATHNAME);
@@ -784,7 +784,7 @@ __forceinline static ssize_t php_win32_ioutil_readlink(const char *path, char *b
free(pathw);
- return ret;
+ return ret_buf_len;
}/*}}}*/
#ifdef __cplusplus