Finally fixed #27.

This commit is contained in:
TheDarkBug 2021-03-14 15:19:49 +01:00
parent da1b4470a1
commit b727eb7c04

View file

@ -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");