X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c0a7edde10fbc1d280ea1864e34db865e09d4e7d..bad79f58afcf3602c4ea5da5f2f0d1594f4e393d:/src/regex/regexec.c diff --git a/src/regex/regexec.c b/src/regex/regexec.c index c3a29093f5..dbae952f71 100644 --- a/src/regex/regexec.c +++ b/src/regex/regexec.c @@ -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,