From ce0af6938441d6018ac8fde9fc1834ef73b75534 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Fri, 18 Mar 2011 03:34:25 -0700 Subject: Better support iPod Touch PLMN. --- MobileCydia.mm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3