diff options
Diffstat (limited to 'src')
| -rwxr-xr-x | src/wrapped/wrappedlibc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c index b3f52353..ea532c7c 100755 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -1474,6 +1474,9 @@ const char* getCpuName() // trim ending while(strlen(tmp) && tmp[strlen(tmp)-1]=='\n') tmp[strlen(tmp)-1] = 0; + // incase multiple cpu type are present, there will be multiple lines + while(strchr(tmp, '\n')) + *strchr(tmp,'\n') = ' '; strncpy(name, tmp, 199); return name; } @@ -1489,6 +1492,9 @@ const char* getCpuName() // trim ending while(strlen(tmp) && tmp[strlen(tmp)-1]=='\n') tmp[strlen(tmp)-1] = 0; + // incase multiple cpu type are present, there will be multiple lines + while(strchr(tmp, '\n')) + *strchr(tmp,'\n') = ' '; snprintf(name, 199, "unknown %s cpu", tmp); return name; } |