Skip to content

Commit

Permalink
Merge pull request #192 from cgohlke/patch-1
Browse files Browse the repository at this point in the history
Fix compile error C2664 on win32
  • Loading branch information
andfoy authored Nov 11, 2021
2 parents bceb883 + ede11a2 commit 3725d83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/csrc/conpty_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ HRESULT PrepareStartupInformation(HPCON hpc, STARTUPINFOEX* psi)

// Discover the size required for the list
size_t bytesRequired;
InitializeProcThreadAttributeList(NULL, 1, 0, &bytesRequired);
InitializeProcThreadAttributeList(NULL, 1, 0, (PSIZE_T)&bytesRequired);

// Allocate memory to represent the list
si.lpAttributeList = (PPROC_THREAD_ATTRIBUTE_LIST)HeapAlloc(GetProcessHeap(), 0, bytesRequired);
Expand All @@ -47,7 +47,7 @@ HRESULT PrepareStartupInformation(HPCON hpc, STARTUPINFOEX* psi)
}

// Initialize the list memory location
if (!InitializeProcThreadAttributeList(si.lpAttributeList, 1, 0, &bytesRequired))
if (!InitializeProcThreadAttributeList(si.lpAttributeList, 1, 0, (PSIZE_T)&bytesRequired))
{
HeapFree(GetProcessHeap(), 0, si.lpAttributeList);
return HRESULT_FROM_WIN32(GetLastError());
Expand Down

0 comments on commit 3725d83

Please sign in to comment.