Finally fixed #27.
This commit is contained in:
parent
da1b4470a1
commit
b727eb7c04
1 changed files with 1 additions and 1 deletions
|
@ -170,7 +170,7 @@ void get_info() { // get all necessary info
|
||||||
sprintf(version_name, "android");
|
sprintf(version_name, "android");
|
||||||
// android vars
|
// android vars
|
||||||
FILE *whoami = popen("whoami", "r");
|
FILE *whoami = popen("whoami", "r");
|
||||||
fscanf(whoami, "%s", user);
|
if (fscanf(whoami, "%s", user) == 3) sprintf(user, "unknown");
|
||||||
fclose(whoami);
|
fclose(whoami);
|
||||||
while (fgets(line, sizeof(line), cpuinfo)) if (fscanf(cpuinfo, "Hardware : %[^\n]", cpu_model)) break;
|
while (fgets(line, sizeof(line), cpuinfo)) if (fscanf(cpuinfo, "Hardware : %[^\n]", cpu_model)) break;
|
||||||
} else sprintf(version_name, "unknown");
|
} else sprintf(version_name, "unknown");
|
||||||
|
|
Loading…
Reference in a new issue