diff --git a/src/common/ascii.h b/src/common/ascii.h index 97e0efc..1e418f9 100644 --- a/src/common/ascii.h +++ b/src/common/ascii.h @@ -12,10 +12,10 @@ \ \ @@@@ @@@ @@@ @@@@@@@@ ############ \ - @@@@@@ @@@@@ @@@@ @@@ @@@@ ########## \ - @@@ @@@ @@@@@@@@@@@@@ @@@ @@ # #### \ - @@@ @@@ @@@ @@@ @@@ @@@ @@@ ### #### \ - @@@@@@@@@@@@ @@@ @@@ @@@ @@@ #### ## ### \ + @@@@@@ @@@@@ @@@@@ @@@ @@@ ########## \ + @@@ @@@ @@@@@@@@@@@@@ @@@ @@ # ##### \ + @@@ @@@ @@@ @@@ @@@ @@@ @@ ### ##### \ + @@@@@@@@@@@@ @@@ @@@ @@@ @@@ ######### ### \ @@@ @@@ @@@ @@@ @@@@@@@@@ ######## ## \ \ \ diff --git a/src/common/cpu.c b/src/common/cpu.c index dd47ac2..cf93868 100755 --- a/src/common/cpu.c +++ b/src/common/cpu.c @@ -147,18 +147,18 @@ char* get_str_l3(struct cache* cach) { char* get_str_freq(struct frequency* freq) { //Max 3 digits and 3 for '(M/G)Hz' plus 1 for '\0' - uint32_t size = (4+3+1); + uint32_t size = (5+1+3+1); assert(strlen(STRING_UNKNOWN)+1 <= size); char* string = malloc(sizeof(char)*size); memset(string, 0, sizeof(char)*size); - + 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); + snprintf(string,size,"%.3f "STRING_GIGAHERZ,(float)(freq->max)/1000); else - snprintf(string,size,"%d"STRING_MEGAHERZ,freq->max); - + snprintf(string,size,"%d "STRING_MEGAHERZ,freq->max); + return string; } diff --git a/src/common/main.c b/src/common/main.c index 7831463..1d33724 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -13,7 +13,7 @@ #include "../arm/midr.h" #endif -static const char* VERSION = "0.95"; +static const char* VERSION = "0.96"; void print_help(char *argv[]) { printf("Usage: %s [--version] [--help] [--debug] [--style \"fancy\"|\"retro\"|\"legacy\"] [--color \"intel\"|\"amd\"|'R,G,B:R,G,B:R,G,B:R,G,B']\n\n", argv[0]);