ntok must be greater than or equal to 3, not 2

This commit is contained in:
Miro Torrielli 2024-03-30 11:34:03 +01:00
parent afd6acb383
commit fd31012b2c

View file

@ -182,9 +182,9 @@ xstat(int first)
readfile(fd);
for(i=0; i<nline; i++){
tokens(i);
if(ntok < 2)
if(ntok < 3)
continue;
if(strcmp(tok[0], "siblings") == 0 && ntok >= 2){
if(strcmp(tok[0], "siblings") == 0 && ntok >= 3){
numcores = atoll(tok[2]);
break;
}