mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-11-14 06:49:54 +00:00
llama-bench : fix NUL terminators in CPU name (#9313)
This commit is contained in:
parent
581c305186
commit
bdf314f38a
@ -124,6 +124,9 @@ static std::string get_cpu_info() {
|
|||||||
(LPBYTE)cpu_brand,
|
(LPBYTE)cpu_brand,
|
||||||
&cpu_brand_size) == ERROR_SUCCESS) {
|
&cpu_brand_size) == ERROR_SUCCESS) {
|
||||||
id.assign(cpu_brand, cpu_brand_size);
|
id.assign(cpu_brand, cpu_brand_size);
|
||||||
|
if (id.find('\0') != std::string::npos) {
|
||||||
|
id.resize(id.find('\0'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user