just in case sign extension kicks in
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Sun, 8 Oct 2006 05:48:09 +0000 (05:48 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Sun, 8 Oct 2006 05:48:09 +0000 (05:48 -0000)
svn path=/trunk/mono/; revision=66396

eglib/src/gstr.c

index d4493a5c42bdffe7f9f2b239f864ae2c0296fc91..08944ef0a2df2f7b87c2f5f4053cf331f4521571 100644 (file)
@@ -609,7 +609,7 @@ g_strescape (const gchar *source, const gchar *exceptions)
                        if (op != 1) {
                                *res_ptr++ = op;
                        } else {
-                               *res_ptr++ = '0' + ((c >> 6) & 7);
+                               *res_ptr++ = '0' + ((c >> 6) & 3);
                                *res_ptr++ = '0' + ((c >> 3) & 7);
                                *res_ptr++ = '0' + (c & 7);
                        }