]> git.saurik.com Git - cydia.git/commitdiff
Sanity check pcre_fullinfo (not that it helps clang).
authorJay Freeman (saurik) <saurik@saurik.com>
Fri, 10 Jun 2011 19:22:36 +0000 (12:22 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Fri, 10 Jun 2011 19:22:36 +0000 (12:22 -0700)
CyteKit/PerlCompatibleRegEx.hpp

index 38a9462a3a97a497437d5f7a4cbf1f17b47cdfca..602f446c743572cdd07b62e3cd70530c448a52b5 100644 (file)
@@ -85,6 +85,7 @@ class Pcre {
         }
 
         pcre_fullinfo(code_, study_, PCRE_INFO_CAPTURECOUNT, &capture_);
         }
 
         pcre_fullinfo(code_, study_, PCRE_INFO_CAPTURECOUNT, &capture_);
+        _assert(capture_ >= 0);
         matches_ = new int[(capture_ + 1) * 3];
     }
 
         matches_ = new int[(capture_ + 1) * 3];
     }