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

This commit is contained in:
Quantum authored and Geoffrey McRae committed 2021-08-31 20:57:34 +10:00
1 parent 5fc561fa63
commit ffabdd348c
1 file changed
+6
+6
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;
}