X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmisc.cpp;h=bca4887673ab78e7c67938602853d74769c2e98e;hb=298cf150958212e3270182644fd87f5489823b27;hp=4d2abd5a17d65d231ca75c35e22c29145e551c7f;hpb=3e6ac38fdad0bf852f7edac6735c67be245d6713;p=stockfish diff --git a/src/misc.cpp b/src/misc.cpp index 4d2abd5a..bca48876 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -258,7 +258,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++; @@ -269,6 +269,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); }