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-05 21:23:30 +02:00
committed by Lennart Poettering
parent a1102c1f63
commit df37291a51
+1 -1
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;