]> git.saurik.com Git - wxWidgets.git/blobdiff - src/regex/regcomp.c
don't assert when creating an initially empty wxCB_READONLY combobox
[wxWidgets.git] / src / regex / regcomp.c
index 39de02eb6f6f6b49388e9dd82e57a7557efdbaa0..69f9517447db00bf1d13f69676fd257218875d9c 100644 (file)
@@ -296,18 +296,7 @@ regcomp(regex_t *re,
                    const chr *string,
                   int flags)
 {
-    
-    size_t nLen = 0;
-    chr* s2 = (chr*) string;
-
-    if (string && *string)
-    {
-        while(*++s2);
-    }
-
-    nLen = ((s2 - string) / sizeof(chr));
-
-       return wx_regcomp(re, string, nLen, flags);
+       return wx_regcomp(re, string, wx_strlen(string), flags);
 }
 int
 wx_regcomp(regex_t *re,