From a7a59ee17629f021ddfbd50efad87b30a3b54ff0 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 15 Nov 2010 12:03:28 -0800 Subject: Re-calibrated PackagePrefixRadix() to more accurately sort punctuation characters. --- MobileCydia.mm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'MobileCydia.mm') 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(data)); -- cgit v1.2.3