[v0.94] Fix compilation issues

This commit is contained in:
Dr-Noob
2020-12-01 16:13:38 +01:00
parent b1f3196e0d
commit 01e22b8090
5 changed files with 10 additions and 4 deletions

View File

@@ -152,7 +152,7 @@ char* get_str_freq(struct frequency* freq) {
char* string = malloc(sizeof(char)*size);
memset(string, 0, sizeof(char)*size);
if(freq->max == UNKNOWN_FREQ)
if(freq->max == UNKNOWN_FREQ || freq->max < 0)
snprintf(string,strlen(STRING_UNKNOWN)+1,STRING_UNKNOWN);
else if(freq->max >= 1000)
snprintf(string,size,"%.2f"STRING_GIGAHERZ,(float)(freq->max)/1000);

View File

@@ -172,6 +172,10 @@ struct ascii* set_ascii(VENDOR vendor, STYLE style, struct colors* cs) {
COL_FANCY_4 = COLOR_FG_GREEN;
art->ascii_chars[0] = '@';
}
else {
printBug("Invalid CPU vendor in set_ascii (%d)", art->vendor);
return NULL;
}
#elif ARCH_ARM
if(art->vendor == SOC_SNAPDRAGON) {
COL_FANCY_1 = COLOR_BG_RED;