fix
This commit is contained in:
parent
18697ea260
commit
b75d33b275
@ -35,7 +35,7 @@ int GetOs(char *os_name, size_t len) {
|
||||
while (fgets(os_name, len, fp)) {
|
||||
if (!strncmp(os_name, "PRETTY_NAME=\"", 5)) {
|
||||
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);
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user