summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-03-18 03:34:25 -0700
committerJay Freeman (saurik) <saurik@saurik.com>2011-03-18 03:34:25 -0700
commitce0af6938441d6018ac8fde9fc1834ef73b75534 (patch)
tree2c43edca92c363499cf36fe80e69aec55b90ffa7
parent10ff766486cd8cf207f20ceeb0c952806741a48a (diff)
Better support iPod Touch PLMN.
-rw-r--r--MobileCydia.mm6
1 files changed, 5 insertions, 1 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index d02aa5e..471299c 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -10230,7 +10230,11 @@ int main(int argc, char *argv[]) {
CFStringRef mnc($CTSIMSupportCopyMobileSubscriberNetworkCode == NULL ? NULL : (*$CTSIMSupportCopyMobileSubscriberNetworkCode)(kCFAllocatorDefault));
if (mcc != NULL && mnc != NULL)
- PLMN_ = [NSString stringWithFormat:@"%@%@", mcc, mnc];
+ if (CFStringGetLength(mcc) == 3) {
+ CFIndex length(CFStringGetLength(mnc));
+ if (length == 2 || length == 3)
+ PLMN_ = [NSString stringWithFormat:@"%@%@", mcc, mnc];
+ }
if (mnc != NULL)
CFRelease(mnc);