This commit is contained in:
Your Name 2023-11-26 13:54:14 +03:00
parent 18697ea260
commit b75d33b275
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

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