CPU (macOS): fix compiling

This commit is contained in:
李通洲
2024-05-18 18:22:32 +08:00
committed by Carter Li
parent 7946e69a66
commit d88e2eeb36
2 changed files with 8 additions and 6 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ void ffPrintCPU(FFCPUOptions* options)
{
FF_STRBUF_AUTO_DESTROY coreTypes = ffStrbufCreate();
uint32_t typeCount = 0;
while (cpu.coreTypes[typeCount].count != 0) typeCount++;
while (cpu.coreTypes[typeCount].count != 0 && typeCount < sizeof(cpu.coreTypes) / sizeof(cpu.coreTypes[0])) typeCount++;
if (typeCount > 0)
{
qsort(cpu.coreTypes, typeCount, sizeof(cpu.coreTypes[0]), (void*) sortCores);