Upper half of byte is >> 4, not >> 8. Found by Kjartan Maraas via sparse
authorAlexander Larsson <alexl@redhat.com>
Fri, 10 Oct 2008 11:35:39 +0000 (11:35 +0000)
committerAlexander Larsson <alexl@src.gnome.org>
Fri, 10 Oct 2008 11:35:39 +0000 (11:35 +0000)
2008-10-10  Alexander Larsson  <alexl@redhat.com>

* 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
gio/gfileattribute.c

index 0ceb81a7729a364ade34c840fe86153c8f196508..744cd41acef2e3d5a40a2b4fb802850e18560586 100644 (file)
@@ -1,3 +1,9 @@
+2008-10-10  Alexander Larsson  <alexl@redhat.com>
+
+       * gfileattribute.c (escape_byte_string):
+       Upper half of byte is >> 4, not >> 8.
+       Found by Kjartan Maraas via sparse
+
 2008-10-10  Matthias Clasen  <mclasen@redhat.com>
 
        Bug 555711 – Wrong fallback order of mimetype icons
index 76bdf61196e421a91f2b0ebc7ed022afab3ef19d..338f8093db98d0f2b78bd84f18798e7728ada2a3 100644 (file)
@@ -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];
            }
        }