mirror of
https://github.com/systemd/systemd.git
synced 2025-01-05 13:18:06 +03:00
unit-name: fix unit name escaping
we want to do a bitwise shift, not a greater-than comparision
This commit is contained in:
parent
a1102c1f63
commit
df37291a51
@ -211,7 +211,7 @@ static char* do_escape(const char *f, char *t) {
|
||||
else if (*f == '-' || *f == '\\' || !strchr(VALID_CHARS, *f)) {
|
||||
*(t++) = '\\';
|
||||
*(t++) = 'x';
|
||||
*(t++) = hexchar(*f > 4);
|
||||
*(t++) = hexchar(*f >> 4);
|
||||
*(t++) = hexchar(*f);
|
||||
} else
|
||||
*(t++) = *f;
|
||||
|
Loading…
Reference in New Issue
Block a user