mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Fix GetProcessGroupAffinity call
`GetProcessGroupAffinity` appears to require 4 byte alignment for `GroupArray` memory. See https://stackoverflow.com/q/78567676 for further information closes https://github.com/official-stockfish/Stockfish/pull/5340 No functional change
This commit is contained in:
parent
8aaae0367c
commit
a2a7edf4c8
1 changed files with 2 additions and 2 deletions
|
@ -773,8 +773,8 @@ class NumaConfig {
|
|||
return std::nullopt;
|
||||
|
||||
// We are expecting a single group.
|
||||
USHORT GroupCount = 1;
|
||||
USHORT GroupArray[1];
|
||||
USHORT GroupCount = 1;
|
||||
alignas(4) USHORT GroupArray[1];
|
||||
status = GetProcessGroupAffinity_f(GetCurrentProcess(), &GroupCount, GroupArray);
|
||||
if (status == 0 || GroupCount != 1)
|
||||
return std::nullopt;
|
||||
|
|
Loading…
Add table
Reference in a new issue