Fixed #42, shortened shell name for termux.

This commit is contained in:
TheDarkBug 2021-03-16 20:25:09 +01:00
parent 117dfe96dd
commit 20958b6118

View file

@ -176,7 +176,8 @@ void get_info() { // get all necessary info
} }
fclose(cpuinfo); fclose(cpuinfo);
gethostname(host, 256); gethostname(host, 256);
sscanf(getenv("SHELL"), "%*[bin/]%s", shell); sscanf(getenv("SHELL"), "%s", shell);
if (strlen(shell) > 16) memmove(&shell, &shell[27], sizeof(shell)); // android shell was too long, this works only for termux
// system resources // system resources
uname(&sys_var); uname(&sys_var);