[v0.98] Fix bug in get_str_peak_performance and always show unknown pp when freq is also unknown

This commit is contained in:
Dr-Noob
2021-08-07 08:57:41 +02:00
parent 2b21326167
commit a03f296390
2 changed files with 6 additions and 3 deletions

View File

@@ -157,6 +157,7 @@ char* get_str_peak_performance(int64_t flops) {
if(flops == -1) {
str = emalloc(sizeof(char) * (strlen(STRING_UNKNOWN) + 1));
strncpy(str, STRING_UNKNOWN, strlen(STRING_UNKNOWN) + 1);
return str;
}
// 7 for digits (e.g, XXXX.XX), 7 for XFLOP/s