From a3f127ff810ef1b1cde8a524232efab8e2b8711d Mon Sep 17 00:00:00 2001 From: Mike Kelly Date: Fri, 1 Oct 2010 02:55:09 -0400 Subject: [PATCH] unit-name: fix unit name escaping we want to do a bitwise shift, not a greater-than comparision --- src/unit-name.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/unit-name.c b/src/unit-name.c index 2e2948a..868d13e 100644 --- a/src/unit-name.c +++ b/src/unit-name.c @@ -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; -- 1.7.2.3