X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmisc.cpp;h=449e07cee9b28530b6c1f646be50043c7a905a33;hp=2bcc7c1382de2514bf34c200106860824c6da33b;hb=5446e6f408f2ed7fa281dbe0097c46674d193260;hpb=9b276a6596eec6fbdcdb29d55ea0b15f5057c853 diff --git a/src/misc.cpp b/src/misc.cpp index 2bcc7c13..449e07ce 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -257,7 +257,7 @@ int best_group(size_t idx) { return -1; } - while (ptr->Size > 0 && byteOffset + ptr->Size <= returnLength) + while (byteOffset < returnLength) { if (ptr->Relationship == RelationNumaNode) nodes++; @@ -268,6 +268,7 @@ int best_group(size_t idx) { threads += (ptr->Processor.Flags == LTP_PC_SMT) ? 2 : 1; } + assert(ptr->Size); byteOffset += ptr->Size; ptr = (SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX*)(((char*)ptr) + ptr->Size); }