1
0
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:
Mike Kelly 2010-10-01 19:58:07 -04:00 committed by Lennart Poettering
parent a1102c1f63
commit df37291a51

View File

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