fix
This commit is contained in:
parent
18697ea260
commit
b75d33b275
4
config.h
4
config.h
@ -20,8 +20,8 @@ static PARAMETR CONFIG[] = {
|
|||||||
{" ARCH ", GetArch},
|
{" ARCH ", GetArch},
|
||||||
{" SHELL ", GetShell},
|
{" SHELL ", GetShell},
|
||||||
{" PKGS ", GetPkg},
|
{" PKGS ", GetPkg},
|
||||||
{"", Blank},
|
{" ", Blank},
|
||||||
{"", PrintColors}
|
{" ", PrintColors}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -35,7 +35,7 @@ int GetOs(char *os_name, size_t len) {
|
|||||||
while (fgets(os_name, len, fp)) {
|
while (fgets(os_name, len, fp)) {
|
||||||
if (!strncmp(os_name, "PRETTY_NAME=\"", 5)) {
|
if (!strncmp(os_name, "PRETTY_NAME=\"", 5)) {
|
||||||
os_name[strlen(os_name) - 2] = '\0';
|
os_name[strlen(os_name) - 2] = '\0';
|
||||||
snprintf(os_name, len, os_name + strlen("PRETTY_NAME=\""));
|
snprintf(os_name, len, "%s", os_name + strlen("PRETTY_NAME=\""));
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user