From 84eabd3d59bc655bc6a1ed4715f36356acdcc8fd Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Fri, 10 Oct 2008 11:35:39 +0000 Subject: [PATCH] Upper half of byte is >> 4, not >> 8. Found by Kjartan Maraas via sparse 2008-10-10 Alexander Larsson * gfileattribute.c (escape_byte_string): Upper half of byte is >> 4, not >> 8. Found by Kjartan Maraas via sparse svn path=/trunk/; revision=7590 --- gio/ChangeLog | 6 ++++++ gio/gfileattribute.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gio/ChangeLog b/gio/ChangeLog index 0ceb81a7..744cd41a 100644 --- a/gio/ChangeLog +++ b/gio/ChangeLog @@ -1,3 +1,9 @@ +2008-10-10 Alexander Larsson + + * gfileattribute.c (escape_byte_string): + Upper half of byte is >> 4, not >> 8. + Found by Kjartan Maraas via sparse + 2008-10-10 Matthias Clasen Bug 555711 – Wrong fallback order of mimetype icons diff --git a/gio/gfileattribute.c b/gio/gfileattribute.c index 76bdf611..338f8093 100644 --- a/gio/gfileattribute.c +++ b/gio/gfileattribute.c @@ -384,7 +384,7 @@ escape_byte_string (const char *str) { *p++ = '\\'; *p++ = 'x'; - *p++ = hex_digits[(c >> 8) & 0xf]; + *p++ = hex_digits[(c >> 4) & 0xf]; *p++ = hex_digits[c & 0xf]; } } -- 2.34.1