mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-02-01 15:53:32 +00:00
[common] cpuinfo: trim trailing whitespace from model name on Windows
This commit is contained in:
parent
5fc561fa63
commit
ffabdd348c
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue