mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-08 04:18:01 +02:00
text-progress-bar: fix os string parsing
If there's no newline the the end of string variable will be NULL instead of at the end of string.
This commit is contained in:
parent
73f1d3e44f
commit
b5cfd7fb30
1 changed files with 2 additions and 0 deletions
|
|
@ -136,6 +136,8 @@ get_os_string (void)
|
|||
|
||||
if (pos2 != NULL)
|
||||
*pos2 = '\0';
|
||||
else
|
||||
pos2 = pos + strlen(pos) - 1;
|
||||
|
||||
if ((*pos == '\"' && pos2[-1] == '\"') ||
|
||||
(*pos == '\'' && pos2[-1] == '\''))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue