[common] cpuinfo: trim trailing whitespace from model name on Windows

This commit is contained in:
Quantum 2021-08-31 06:53:42 -04:00 committed by Geoffrey McRae
parent 5fc561fa63
commit ffabdd348c

View File

@ -49,6 +49,12 @@ static bool getCPUModel(char * model, size_t modelSize)
return false;
}
// trim any whitespace
--cb;
while (cb > 0 && isspace(model[cb-1]))
--cb;
model[cb] = '\0';
return true;
}