From: Jay Freeman (saurik) Date: Fri, 18 Mar 2011 10:57:17 +0000 (-0700) Subject: Even cleaner PLMN support. X-Git-Tag: v1.1.0%rc1~82 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/dfeb43ed8472608961b37bc69f19222abb4c8f1a Even cleaner PLMN support. --- diff --git a/MobileCydia.mm b/MobileCydia.mm index 471299c7..f57d5f16 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -10232,8 +10232,13 @@ int main(int argc, char *argv[]) { if (mcc != NULL && mnc != NULL) if (CFStringGetLength(mcc) == 3) { CFIndex length(CFStringGetLength(mnc)); - if (length == 2 || length == 3) + if (length == 2 || length == 3) { PLMN_ = [NSString stringWithFormat:@"%@%@", mcc, mnc]; + + Pcre pattern("^[0-9]{5,6}$"); + if (!pattern(PLMN_)) + PLMN_ = nil; + } } if (mnc != NULL)