mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-25 16:00:39 +01:00
[v0.94] Fix compilation issues
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user