]> git.saurik.com Git - cydia.git/commitdiff
Re-calibrated PackagePrefixRadix() to more accurately sort punctuation characters.
authorJay Freeman (saurik) <saurik@saurik.com>
Mon, 15 Nov 2010 20:03:28 +0000 (12:03 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 15 Nov 2010 22:39:13 +0000 (14:39 -0800)
MobileCydia.mm

index faf2dc18db38ed2cad2b6a789581a8334053bddb..43a3053bc3349413074defd79ffa79c58bd63680 100644 (file)
@@ -1949,11 +1949,14 @@ uint32_t PackagePrefixRadix(Package *self, void *context) {
 
         for (size_t i(0); i != 4; ++i)
             if (isalpha(data[i]))
-                data[i] &= 0xdf;
+                data[i] |= 0x20;
     }
 
     if (offset == 0)
-        data[0] = (data[0] & 0x3f) | "\x80\x00\xc0\x40"[data[0] >> 6];
+        if (data[0] == '@')
+            data[0] = 0x7f;
+        else
+            data[0] = (data[0] & 0x1f) | "\x80\x00\xc0\x40"[data[0] >> 6];
 
     /* XXX: ntohl may be more honest */
     return OSSwapInt32(*reinterpret_cast<uint32_t *>(data));