]> git.saurik.com Git - cydia.git/commitdiff
Even cleaner PLMN support.
authorJay Freeman (saurik) <saurik@saurik.com>
Fri, 18 Mar 2011 10:57:17 +0000 (03:57 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Fri, 18 Mar 2011 10:57:17 +0000 (03:57 -0700)
MobileCydia.mm

index 471299c72df5546484489a52eaab7f99d0937818..f57d5f165d4ccc365a273cc6a32ac239aea61a08 100644 (file)
@@ -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)