Skip to content

Commit

Permalink
Fix size_t attr_list_size to SIZE_T attr_list_size
Browse files Browse the repository at this point in the history
Caused conversion errors on 32-bit Windows as size_t on 32-bit is unsigned int whereas on 32-bit Windows' SIZE_T is unsigned long
  • Loading branch information
Spartan322 committed Nov 17, 2024
1 parent f66b3b2 commit a5792dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions platform/windows/os_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ Dictionary OS_Windows::execute_with_pipe(const String &p_path, const List<String
pi.si.StartupInfo.hStdOutput = pipe_out[1];
pi.si.StartupInfo.hStdError = pipe_err[1];

size_t attr_list_size = 0;
SIZE_T attr_list_size = 0;
InitializeProcThreadAttributeList(nullptr, 1, 0, &attr_list_size);
pi.si.lpAttributeList = (LPPROC_THREAD_ATTRIBUTE_LIST)alloca(attr_list_size);
if (!InitializeProcThreadAttributeList(pi.si.lpAttributeList, 1, 0, &attr_list_size)) {
Expand Down Expand Up @@ -948,7 +948,7 @@ Error OS_Windows::execute(const String &p_path, const List<String> &p_arguments,
pi.si.StartupInfo.hStdError = pipe[1];
}

size_t attr_list_size = 0;
SIZE_T attr_list_size = 0;
InitializeProcThreadAttributeList(nullptr, 1, 0, &attr_list_size);
pi.si.lpAttributeList = (LPPROC_THREAD_ATTRIBUTE_LIST)alloca(attr_list_size);
if (!InitializeProcThreadAttributeList(pi.si.lpAttributeList, 1, 0, &attr_list_size)) {
Expand Down

0 comments on commit a5792dd

Please sign in to comment.