Commit e847d717 authored by Victor Stinner's avatar Victor Stinner

Issue #25846: Fix usage of Py_ARRAY_LENGTH() in win32_wchdir() (new try)

parent 51a4b22f
......@@ -1354,7 +1354,7 @@ win32_wchdir(LPCWSTR path)
result = GetCurrentDirectoryW(Py_ARRAY_LENGTH(path_buf), new_path);
if (!result)
return FALSE;
if (result > Py_ARRAY_LENGTH(new_path)) {
if (result > Py_ARRAY_LENGTH(path_buf)) {
new_path = PyMem_RawMalloc(result * sizeof(wchar_t));
if (!new_path) {
SetLastError(ERROR_OUTOFMEMORY);
......
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