]> git.saurik.com Git - wxWidgets.git/blobdiff - src/regex/regexec.c
added condition for DARWIN (thanks to Steve Hartwell)
[wxWidgets.git] / src / regex / regexec.c
index c3a29093f580e96ca8a96eff4b6349c117d6ded0..dbae952f71298c43bf8a78cb6a7d11d03764aa7b 100644 (file)
@@ -172,17 +172,7 @@ regexec(regex_t *re,
                   int flags)
 {
        rm_detail_t det;
-    size_t nLen = 0;
-    chr* s2 = (chr*) string;
-
-    if (string && *string)
-    {
-        while(*++s2);
-    }
-
-    nLen = ((s2 - string) / sizeof(chr));
-
-    return wx_regexec(re, string, nLen, &det, nmatch, pmatch, flags);
+    return wx_regexec(re, string, wx_strlen(string), &det, nmatch, pmatch, flags);
 }
 int
 wx_regexec(regex_t *re,