diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2010-11-15 12:03:28 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2010-11-15 14:39:13 -0800 |
commit | a7a59ee17629f021ddfbd50efad87b30a3b54ff0 (patch) | |
tree | 9774f5e9b115f28b3e9d355b9316fd5b5d4cd506 | |
parent | 1539387a23672ee0145f681b88f374f0b078c19e (diff) |
Re-calibrated PackagePrefixRadix() to more accurately sort punctuation characters.
-rw-r--r-- | MobileCydia.mm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index faf2dc1..43a3053 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -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)); |